forked from Ericsson/codechecker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test of new table in database and check try
- Loading branch information
Showing
6 changed files
with
97 additions
and
82 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
37 changes: 37 additions & 0 deletions
37
..._server/migrations/config/versions/5bdea278c415_create_a_state_table_for_verification_.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,37 @@ | ||
""" | ||
Create a state table for verification for OAuth | ||
Revision ID: 5bdea278c415 | ||
Revises: 00099e8bc212 | ||
Create Date: 2024-10-09 16:14:33.235797 | ||
""" | ||
|
||
from logging import getLogger | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
# Revision identifiers, used by Alembic. | ||
revision = '5bdea278c415' | ||
down_revision = '00099e8bc212' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
LOG = getLogger("migration/config") | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table('state_codes', | ||
sa.Column('id', sa.Integer(), | ||
autoincrement=True, nullable=False), | ||
sa.Column('state', sa.String(), nullable=False), | ||
sa.Column('expires_at', sa.DateTime(), nullable=True), | ||
sa.PrimaryKeyConstraint('id', name=op.f('pk_state_codes'))) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
LOG = getLogger("migration/config") | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_table('state_codes') | ||
# ### end Alembic commands ### |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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