
# revision identifiers, used by Alembic.
revision = '1fbbb727e1dc'
down_revision = '2dd8b091742b'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.execute(u'alter table users alter column last_ip type inet using last_ip::inet;')
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    pass
    ### end Alembic commands ###


# revision identifiers, used by Alembic.
revision = '1fbbb727e1dc'
down_revision = '2dd8b091742b'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    # Default needs to be dropped because the old default of an empty string cannot be casted to an IP.
    op.execute(u'alter table users alter column last_ip drop default;')
    op.execute(u'alter table users alter column last_ip type inet using last_ip::inet;')


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    pass
    ### end Alembic commands ###

Fix migrations from text to inet.
Fix migrations from text to inet.

  
  # revision identifiers, used by Alembic.
  revision = '1fbbb727e1dc'
  down_revision = '2dd8b091742b'
  branch_labels = None
  depends_on = None
  
  from alembic import op
  import sqlalchemy as sa
  
  
  def upgrade():
-     ### commands auto generated by Alembic - please adjust! ###
+     # Default needs to be dropped because the old default of an empty string cannot be casted to an IP.
+     op.execute(u'alter table users alter column last_ip drop default;')
      op.execute(u'alter table users alter column last_ip type inet using last_ip::inet;')
-     ### end Alembic commands ###
  
  
  def downgrade():
      ### commands auto generated by Alembic - please adjust! ###
      pass
      ### end Alembic commands ###
  
Fix migrations from text to inet.
## Code Before:

# revision identifiers, used by Alembic.
revision = '1fbbb727e1dc'
down_revision = '2dd8b091742b'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.execute(u'alter table users alter column last_ip type inet using last_ip::inet;')
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    pass
    ### end Alembic commands ###

## Instruction:
Fix migrations from text to inet.
## Code After:

# revision identifiers, used by Alembic.
revision = '1fbbb727e1dc'
down_revision = '2dd8b091742b'
branch_labels = None
depends_on = None

from alembic import op
import sqlalchemy as sa


def upgrade():
    # Default needs to be dropped because the old default of an empty string cannot be casted to an IP.
    op.execute(u'alter table users alter column last_ip drop default;')
    op.execute(u'alter table users alter column last_ip type inet using last_ip::inet;')


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    pass
    ### end Alembic commands ###
