
# revision identifiers, used by Alembic.
revision = '72fa5bce100b'
down_revision = '40855b7eb958'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.create_table(
        'aim_tenant_trees',
        sa.Column('rn', sa.String(64), nullable=False),
        sa.Column('root_full_hash', sa.String(64), nullable=False),
        sa.Column('tree', sa.LargeBinary, nullable=False),
        sa.PrimaryKeyConstraint('rn'))


def downgrade():
    pass


# revision identifiers, used by Alembic.
revision = '72fa5bce100b'
down_revision = '40855b7eb958'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.create_table(
        'aim_tenant_trees',
        sa.Column('tenant_rn', sa.String(64), nullable=False),
        sa.Column('root_full_hash', sa.String(64), nullable=False),
        sa.Column('tree', sa.LargeBinary, nullable=False),
        sa.PrimaryKeyConstraint('tenant_rn'))


def downgrade():
    pass

Fix db migration for tree model
Fix db migration for tree model

  
  # revision identifiers, used by Alembic.
  revision = '72fa5bce100b'
  down_revision = '40855b7eb958'
  branch_labels = None
  depends_on = None
  
  from alembic import op
  import sqlalchemy as sa
  
  
  def upgrade():
      op.create_table(
          'aim_tenant_trees',
-         sa.Column('rn', sa.String(64), nullable=False),
+         sa.Column('tenant_rn', sa.String(64), nullable=False),
          sa.Column('root_full_hash', sa.String(64), nullable=False),
          sa.Column('tree', sa.LargeBinary, nullable=False),
-         sa.PrimaryKeyConstraint('rn'))
+         sa.PrimaryKeyConstraint('tenant_rn'))
  
  
  def downgrade():
      pass
  
Fix db migration for tree model
## Code Before:

# revision identifiers, used by Alembic.
revision = '72fa5bce100b'
down_revision = '40855b7eb958'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.create_table(
        'aim_tenant_trees',
        sa.Column('rn', sa.String(64), nullable=False),
        sa.Column('root_full_hash', sa.String(64), nullable=False),
        sa.Column('tree', sa.LargeBinary, nullable=False),
        sa.PrimaryKeyConstraint('rn'))


def downgrade():
    pass

## Instruction:
Fix db migration for tree model
## Code After:

# revision identifiers, used by Alembic.
revision = '72fa5bce100b'
down_revision = '40855b7eb958'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.create_table(
        'aim_tenant_trees',
        sa.Column('tenant_rn', sa.String(64), nullable=False),
        sa.Column('root_full_hash', sa.String(64), nullable=False),
        sa.Column('tree', sa.LargeBinary, nullable=False),
        sa.PrimaryKeyConstraint('tenant_rn'))


def downgrade():
    pass
