Skip to content

Commit

Permalink
EKIRJASTO-131 Fix quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
natlibfi-kaisa committed Dec 16, 2024
1 parent e98297a commit 74556b1
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions alembic/versions/20241210_d3aaeb6a9e6b_create_selectedbooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,40 @@
Create Date: 2024-12-10 14:16:32.223456+00:00
"""
from alembic import op
import sqlalchemy as sa

from alembic import op

# revision identifiers, used by Alembic.
revision = 'd3aaeb6a9e6b'
down_revision = 'b28ac9090d40'
revision = "d3aaeb6a9e6b"
down_revision = "b28ac9090d40"
branch_labels = None
depends_on = None


def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('selected_books',
sa.Column('id', sa.Integer()),
sa.Column('patron_id', sa.Integer()),
sa.Column('work_id', sa.Integer()),
sa.Column('creation_date', sa.DateTime(timezone=True)),
sa.ForeignKeyConstraint(['patron_id'], ['patrons.id'], ),
sa.ForeignKeyConstraint(['work_id'], ['works.id'], ),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('patron_id', 'work_id')
op.create_table(
"selected_books",
sa.Column("id", sa.Integer()),
sa.Column("patron_id", sa.Integer()),
sa.Column("work_id", sa.Integer()),
sa.Column("creation_date", sa.DateTime(timezone=True)),
sa.ForeignKeyConstraint(
["patron_id"],
["patrons.id"],
),
sa.ForeignKeyConstraint(
["work_id"],
["works.id"],
),
sa.PrimaryKeyConstraint("id"),
sa.UniqueConstraint("patron_id", "work_id"),
)
# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('selected_books')
op.drop_table("selected_books")
# ### end Alembic commands ###

0 comments on commit 74556b1

Please sign in to comment.