-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migration for link suggestion and less verbose alembic-check
- Loading branch information
1 parent
cc84ec3
commit 7a7169a
Showing
2 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
"""Add Bar table | ||
Revision ID: b060d9ab3367 | ||
Revises: 7cc8cbfe072d | ||
Create Date: 2023-09-26 15:58:57.060974 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
import sqlalchemy_utils | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'b060d9ab3367' | ||
down_revision = '7cc8cbfe072d' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_table('dapp') | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table('dapp', | ||
sa.Column('created', postgresql.TIMESTAMP(), autoincrement=False, nullable=False), | ||
sa.Column('updated', postgresql.TIMESTAMP(), autoincrement=False, nullable=False), | ||
sa.Column('id', postgresql.UUID(), autoincrement=False, nullable=False), | ||
sa.Column('description', sa.TEXT(), autoincrement=False, nullable=False), | ||
sa.Column('name', sa.VARCHAR(length=255), autoincrement=False, nullable=False), | ||
sa.Column('url', sa.VARCHAR(length=255), autoincrement=False, nullable=False), | ||
sa.Column('twitter_handle', sa.VARCHAR(length=255), autoincrement=False, nullable=True), | ||
sa.Column('blog_links', postgresql.ARRAY(sa.VARCHAR(length=255)), autoincrement=False, nullable=True), | ||
sa.Column('discord', sa.VARCHAR(length=255), autoincrement=False, nullable=True), | ||
sa.Column('facebook', sa.VARCHAR(length=255), autoincrement=False, nullable=True), | ||
sa.Column('instagram', sa.VARCHAR(length=255), autoincrement=False, nullable=True), | ||
sa.Column('telegram', sa.VARCHAR(length=255), autoincrement=False, nullable=True), | ||
sa.PrimaryKeyConstraint('id', name='dapp_pkey'), | ||
sa.UniqueConstraint('name', name='dapp_name_key') | ||
) | ||
# ### end Alembic commands ### |