Skip to content

Commit 31bbd18

Browse files
authored
Changes comment table name (#49)
1 parent 669def4 commit 31bbd18

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

alembic/versions/9618924f9679_adds_comment_link_tables_some_org_.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
def upgrade():
2020
# ### commands auto generated by Alembic - please adjust! ###
2121
op.create_table(
22-
"comment",
22+
"comment_data",
2323
sa.Column("id", postgresql.UUID(as_uuid=True), nullable=False),
2424
sa.Column("project_id", postgresql.UUID(as_uuid=True), nullable=True),
2525
sa.Column("xfkey", postgresql.UUID(as_uuid=True), nullable=True),
@@ -38,13 +38,17 @@ def upgrade():
3838
sa.PrimaryKeyConstraint("id"),
3939
)
4040
op.create_index(
41-
op.f("ix_comment_created_by"), "comment", ["created_by"], unique=False
41+
op.f("ix_comment_data_created_by"), "comment_data", ["created_by"], unique=False
4242
)
4343
op.create_index(
44-
op.f("ix_comment_project_id"), "comment", ["project_id"], unique=False
44+
op.f("ix_comment_data_project_id"), "comment_data", ["project_id"], unique=False
45+
)
46+
op.create_index(
47+
op.f("ix_comment_data_xfkey"), "comment_data", ["xfkey"], unique=False
48+
)
49+
op.create_index(
50+
op.f("ix_comment_data_xftype"), "comment_data", ["xftype"], unique=False
4551
)
46-
op.create_index(op.f("ix_comment_xfkey"), "comment", ["xfkey"], unique=False)
47-
op.create_index(op.f("ix_comment_xftype"), "comment", ["xftype"], unique=False)
4852
op.create_table(
4953
"labeling_access_link",
5054
sa.Column("id", postgresql.UUID(as_uuid=True), nullable=False),
@@ -117,9 +121,9 @@ def downgrade():
117121
op.f("ix_labeling_access_link_created_by"), table_name="labeling_access_link"
118122
)
119123
op.drop_table("labeling_access_link")
120-
op.drop_index(op.f("ix_comment_xftype"), table_name="comment")
121-
op.drop_index(op.f("ix_comment_xfkey"), table_name="comment")
122-
op.drop_index(op.f("ix_comment_project_id"), table_name="comment")
123-
op.drop_index(op.f("ix_comment_created_by"), table_name="comment")
124-
op.drop_table("comment")
124+
op.drop_index(op.f("ix_comment_data_xftype"), table_name="comment_data")
125+
op.drop_index(op.f("ix_comment_data_xfkey"), table_name="comment_data")
126+
op.drop_index(op.f("ix_comment_data_project_id"), table_name="comment_data")
127+
op.drop_index(op.f("ix_comment_data_created_by"), table_name="comment_data")
128+
op.drop_table("comment_data")
125129
# ### end Alembic commands ###

0 commit comments

Comments
 (0)