diff --git a/package.json b/package.json index 8b9712a2d..2387207b2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "querybook", - "version": "3.34.2", + "version": "3.35.0", "description": "A Big Data Webapp", "private": true, "scripts": { diff --git a/querybook/migrations/versions/a8bb37120302_add_github_link.py b/querybook/migrations/versions/a8bb37120302_add_github_link.py new file mode 100644 index 000000000..c58bceeed --- /dev/null +++ b/querybook/migrations/versions/a8bb37120302_add_github_link.py @@ -0,0 +1,52 @@ +"""Add Github Link + +Revision ID: a8bb37120302 +Revises: f7b11b3e3a95 +Create Date: 2024-10-18 15:50:51.471760 + +""" + +from alembic import op +import sqlalchemy as sa + +# revision identifiers, used by Alembic. +revision = "a8bb37120302" +down_revision = "f7b11b3e3a95" +branch_labels = None +depends_on = None + + +def upgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.create_table( + "github_link", + sa.Column("id", sa.Integer(), autoincrement=True, nullable=False), + sa.Column("datadoc_id", sa.Integer(), nullable=False), + sa.Column("user_id", sa.Integer(), nullable=False), + sa.Column("repo_url", sa.String(length=255), nullable=False), + sa.Column("branch", sa.String(length=255), nullable=False), + sa.Column("file_path", sa.String(length=255), nullable=False), + sa.Column( + "created_at", sa.DateTime(), server_default=sa.text("now()"), nullable=False + ), + sa.Column( + "updated_at", sa.DateTime(), server_default=sa.text("now()"), nullable=False + ), + sa.ForeignKeyConstraint( + ["datadoc_id"], + ["data_doc.id"], + ), + sa.ForeignKeyConstraint( + ["user_id"], + ["user.id"], + ), + sa.PrimaryKeyConstraint("id"), + sa.UniqueConstraint("datadoc_id"), + ) + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + op.drop_table("github_link") + # ### end Alembic commands ###