diff options
Diffstat (limited to 'migrations/versions/81173c1d4f0a_initial_migration.py')
| -rw-r--r-- | migrations/versions/81173c1d4f0a_initial_migration.py | 45 | 
1 files changed, 1 insertions, 44 deletions
diff --git a/migrations/versions/81173c1d4f0a_initial_migration.py b/migrations/versions/81173c1d4f0a_initial_migration.py index f96ff21..4345556 100644 --- a/migrations/versions/81173c1d4f0a_initial_migration.py +++ b/migrations/versions/81173c1d4f0a_initial_migration.py @@ -37,54 +37,11 @@ def upgrade():      sa.UniqueConstraint('email'),      sa.UniqueConstraint('fs_uniquifier')      ) -    op.drop_table('enroll_requests') -    op.drop_table('_sqlx_migrations') -    op.drop_table('networks') -    op.drop_table('peers') -    op.drop_table('users') -    # ### end Alembic commands ### +   # ### end Alembic commands ###  def downgrade():      # ### commands auto generated by Alembic - please adjust! ### -    op.create_table('users', -    sa.Column('id', sa.TEXT(), autoincrement=False, nullable=False), -    sa.Column('email', sa.TEXT(), autoincrement=False, nullable=False), -    sa.Column('pref_name', sa.TEXT(), autoincrement=False, nullable=False), -    sa.Column('pw_hash', sa.TEXT(), autoincrement=False, nullable=False), -    sa.Column('last_login', postgresql.TIMESTAMP(), autoincrement=False, nullable=True), -    sa.PrimaryKeyConstraint('id', name='users_pkey'), -    postgresql_ignore_search_path=False -    ) -    op.create_table('peers', -    sa.Column('id', sa.TEXT(), autoincrement=False, nullable=False), -    sa.Column('addr', postgresql.CIDR(), autoincrement=False, nullable=False), -    sa.Column('public_key', sa.TEXT(), autoincrement=False, nullable=False), -    sa.Column('owner', sa.TEXT(), autoincrement=False, nullable=False), -    sa.ForeignKeyConstraint(['owner'], ['users.id'], name='peers_owner_fkey'), -    sa.PrimaryKeyConstraint('id', name='peers_pkey') -    ) -    op.create_table('networks', -    sa.Column('id', sa.TEXT(), autoincrement=False, nullable=False), -    sa.Column('subnet', postgresql.CIDR(), autoincrement=False, nullable=False), -    sa.Column('description', sa.TEXT(), autoincrement=False, nullable=True), -    sa.PrimaryKeyConstraint('id', name='networks_pkey') -    ) -    op.create_table('_sqlx_migrations', -    sa.Column('version', sa.BIGINT(), autoincrement=False, nullable=False), -    sa.Column('description', sa.TEXT(), autoincrement=False, nullable=False), -    sa.Column('installed_on', postgresql.TIMESTAMP(timezone=True), server_default=sa.text('now()'), autoincrement=False, nullable=False), -    sa.Column('success', sa.BOOLEAN(), autoincrement=False, nullable=False), -    sa.Column('checksum', postgresql.BYTEA(), autoincrement=False, nullable=False), -    sa.Column('execution_time', sa.BIGINT(), autoincrement=False, nullable=False), -    sa.PrimaryKeyConstraint('version', name='_sqlx_migrations_pkey') -    ) -    op.create_table('enroll_requests', -    sa.Column('token', sa.TEXT(), autoincrement=False, nullable=False), -    sa.Column('expires', postgresql.TIMESTAMP(), server_default=sa.text("(CURRENT_TIMESTAMP + ((30)::double precision * '00:01:00'::interval))"), autoincrement=False, nullable=False), -    sa.Column('confirmed', sa.BOOLEAN(), server_default=sa.text('false'), autoincrement=False, nullable=False), -    sa.PrimaryKeyConstraint('token', name='enroll_requests_pkey') -    )      op.drop_table('user')      op.drop_table('role')      # ### end Alembic commands ###  | 
