-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding the notes table and versioning
- Loading branch information
Showing
5 changed files
with
246 additions
and
36 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
35 changes: 35 additions & 0 deletions
35
alembic/versions/8feb0a6fbd27_adding_the_notes_table_and_changing_.py
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,35 @@ | ||
"""Adding the notes table and changing libraries table | ||
Revision ID: 8feb0a6fbd27 | ||
Revises: 4039aa74290f | ||
Create Date: 2023-08-13 21:38:18.660449 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '8feb0a6fbd27' | ||
down_revision = '4039aa74290f' | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table('notes', | ||
sa.Column('id', sa.Integer(), nullable=False), | ||
sa.Column('content', sa.UnicodeText(), nullable=True), | ||
sa.Column('bibcode', sa.String(length=50), nullable=False), | ||
sa.Column('library_id', biblib.models.GUID(), nullable=True), | ||
sa.Column('date_created', sa.DateTime(), nullable=False), | ||
sa.Column('date_last_modified', sa.DateTime(), nullable=False), | ||
sa.ForeignKeyConstraint(['library_id'], ['library.id'], ), | ||
sa.PrimaryKeyConstraint('id') | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_table('notes') | ||
# ### end Alembic commands ### |
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
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