
# revision identifiers, used by Alembic.
revision = '151b2f642877'
down_revision = 'aee7291c81'

from alembic import op
import sqlalchemy as sa


def upgrade():
    query = 'ALTER TABLE project ALTER COLUMN info TYPE JSON USING info::JSON;'
    op.execute(query)
    query = 'ALTER TABLE "user" ALTER COLUMN info TYPE JSON USING info::JSON;'
    op.execute(query)
    query = 'ALTER TABLE task ALTER COLUMN info TYPE JSON USING info::JSON;'
    op.execute(query)
    query = 'ALTER TABLE task_run ALTER COLUMN info TYPE JSON USING info::JSON;'
    op.execute(query)


def downgrade():
    query = 'ALTER TABLE project ALTER COLUMN info TYPE TEXT USING info::TEXT;'
    op.execute(query)
    query = 'ALTER TABLE "user" ALTER COLUMN info TYPE TEXT USING info::TEXT;'
    op.execute(query)
    query = 'ALTER TABLE task ALTER COLUMN info TYPE TEXT USING info::TEXT;'
    op.execute(query)
    query = 'ALTER TABLE task_run ALTER COLUMN info TYPE TEXT USING info::TEXT;'
    op.execute(query)


# revision identifiers, used by Alembic.
revision = '151b2f642877'
down_revision = 'ac115763654'

from alembic import op
import sqlalchemy as sa


def upgrade():
    query = 'ALTER TABLE project ALTER COLUMN info TYPE JSON USING info::JSON;'
    op.execute(query)
    query = 'ALTER TABLE "user" ALTER COLUMN info TYPE JSON USING info::JSON;'
    op.execute(query)
    query = 'ALTER TABLE task ALTER COLUMN info TYPE JSON USING info::JSON;'
    op.execute(query)
    query = 'ALTER TABLE task_run ALTER COLUMN info TYPE JSON USING info::JSON;'
    op.execute(query)


def downgrade():
    query = 'ALTER TABLE project ALTER COLUMN info TYPE TEXT USING info::TEXT;'
    op.execute(query)
    query = 'ALTER TABLE "user" ALTER COLUMN info TYPE TEXT USING info::TEXT;'
    op.execute(query)
    query = 'ALTER TABLE task ALTER COLUMN info TYPE TEXT USING info::TEXT;'
    op.execute(query)
    query = 'ALTER TABLE task_run ALTER COLUMN info TYPE TEXT USING info::TEXT;'
    op.execute(query)

Fix alembic revision after merge master
Fix alembic revision after merge master

  
  # revision identifiers, used by Alembic.
  revision = '151b2f642877'
- down_revision = 'aee7291c81'
+ down_revision = 'ac115763654'
  
  from alembic import op
  import sqlalchemy as sa
  
  
  def upgrade():
      query = 'ALTER TABLE project ALTER COLUMN info TYPE JSON USING info::JSON;'
      op.execute(query)
      query = 'ALTER TABLE "user" ALTER COLUMN info TYPE JSON USING info::JSON;'
      op.execute(query)
      query = 'ALTER TABLE task ALTER COLUMN info TYPE JSON USING info::JSON;'
      op.execute(query)
      query = 'ALTER TABLE task_run ALTER COLUMN info TYPE JSON USING info::JSON;'
      op.execute(query)
  
  
  def downgrade():
      query = 'ALTER TABLE project ALTER COLUMN info TYPE TEXT USING info::TEXT;'
      op.execute(query)
      query = 'ALTER TABLE "user" ALTER COLUMN info TYPE TEXT USING info::TEXT;'
      op.execute(query)
      query = 'ALTER TABLE task ALTER COLUMN info TYPE TEXT USING info::TEXT;'
      op.execute(query)
      query = 'ALTER TABLE task_run ALTER COLUMN info TYPE TEXT USING info::TEXT;'
      op.execute(query)
  
Fix alembic revision after merge master
## Code Before:

# revision identifiers, used by Alembic.
revision = '151b2f642877'
down_revision = 'aee7291c81'

from alembic import op
import sqlalchemy as sa


def upgrade():
    query = 'ALTER TABLE project ALTER COLUMN info TYPE JSON USING info::JSON;'
    op.execute(query)
    query = 'ALTER TABLE "user" ALTER COLUMN info TYPE JSON USING info::JSON;'
    op.execute(query)
    query = 'ALTER TABLE task ALTER COLUMN info TYPE JSON USING info::JSON;'
    op.execute(query)
    query = 'ALTER TABLE task_run ALTER COLUMN info TYPE JSON USING info::JSON;'
    op.execute(query)


def downgrade():
    query = 'ALTER TABLE project ALTER COLUMN info TYPE TEXT USING info::TEXT;'
    op.execute(query)
    query = 'ALTER TABLE "user" ALTER COLUMN info TYPE TEXT USING info::TEXT;'
    op.execute(query)
    query = 'ALTER TABLE task ALTER COLUMN info TYPE TEXT USING info::TEXT;'
    op.execute(query)
    query = 'ALTER TABLE task_run ALTER COLUMN info TYPE TEXT USING info::TEXT;'
    op.execute(query)

## Instruction:
Fix alembic revision after merge master
## Code After:

# revision identifiers, used by Alembic.
revision = '151b2f642877'
down_revision = 'ac115763654'

from alembic import op
import sqlalchemy as sa


def upgrade():
    query = 'ALTER TABLE project ALTER COLUMN info TYPE JSON USING info::JSON;'
    op.execute(query)
    query = 'ALTER TABLE "user" ALTER COLUMN info TYPE JSON USING info::JSON;'
    op.execute(query)
    query = 'ALTER TABLE task ALTER COLUMN info TYPE JSON USING info::JSON;'
    op.execute(query)
    query = 'ALTER TABLE task_run ALTER COLUMN info TYPE JSON USING info::JSON;'
    op.execute(query)


def downgrade():
    query = 'ALTER TABLE project ALTER COLUMN info TYPE TEXT USING info::TEXT;'
    op.execute(query)
    query = 'ALTER TABLE "user" ALTER COLUMN info TYPE TEXT USING info::TEXT;'
    op.execute(query)
    query = 'ALTER TABLE task ALTER COLUMN info TYPE TEXT USING info::TEXT;'
    op.execute(query)
    query = 'ALTER TABLE task_run ALTER COLUMN info TYPE TEXT USING info::TEXT;'
    op.execute(query)
