-
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.
Теперь за автопроверку начисляются монеты авторизованному пользователю
- Loading branch information
1 parent
88a53fc
commit db6fd87
Showing
7 changed files
with
133 additions
and
25 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
backend/migrations/versions/2023_12_16_1826-753c2ee49c0d_добавляет_монеты_сотруднику.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,47 @@ | ||
"""добавляет монеты сотруднику | ||
Revision ID: 753c2ee49c0d | ||
Revises: 920ca0aa0ea3 | ||
Create Date: 2023-12-16 18:26:49.202369 | ||
""" | ||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = '753c2ee49c0d' | ||
down_revision: Union[str, None] = '920ca0aa0ea3' | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index('ix_oauth_account_account_id', table_name='oauth_account') | ||
op.drop_index('ix_oauth_account_oauth_name', table_name='oauth_account') | ||
op.drop_table('oauth_account') | ||
op.add_column('employees', sa.Column('coins', sa.Integer(), nullable=False)) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column('employees', 'coins') | ||
op.create_table('oauth_account', | ||
sa.Column('user_id', sa.UUID(), autoincrement=False, nullable=False), | ||
sa.Column('id', sa.UUID(), autoincrement=False, nullable=False), | ||
sa.Column('oauth_name', sa.VARCHAR(length=100), autoincrement=False, nullable=False), | ||
sa.Column('access_token', sa.VARCHAR(length=1024), autoincrement=False, nullable=False), | ||
sa.Column('expires_at', sa.INTEGER(), autoincrement=False, nullable=True), | ||
sa.Column('refresh_token', sa.VARCHAR(length=1024), autoincrement=False, nullable=True), | ||
sa.Column('account_id', sa.VARCHAR(length=320), autoincrement=False, nullable=False), | ||
sa.Column('account_email', sa.VARCHAR(length=320), autoincrement=False, nullable=False), | ||
sa.ForeignKeyConstraint(['user_id'], ['users.id'], name='oauth_account_user_id_fkey', ondelete='CASCADE'), | ||
sa.PrimaryKeyConstraint('id', name='oauth_account_pkey') | ||
) | ||
op.create_index('ix_oauth_account_oauth_name', 'oauth_account', ['oauth_name'], unique=False) | ||
op.create_index('ix_oauth_account_account_id', 'oauth_account', ['account_id'], unique=False) | ||
# ### end Alembic commands ### |
30 changes: 30 additions & 0 deletions
30
...end/migrations/versions/2023_12_16_1832-ee38e6a7803e_добавляет_отчество_сотрдуникам_и_.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,30 @@ | ||
"""добавляет отчество сотрдуникам и куратору | ||
Revision ID: ee38e6a7803e | ||
Revises: 753c2ee49c0d | ||
Create Date: 2023-12-16 18:32:42.403504 | ||
""" | ||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = 'ee38e6a7803e' | ||
down_revision: Union[str, None] = '753c2ee49c0d' | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column('tutors', sa.Column('patronymic', sa.String(length=255), nullable=False)) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column('tutors', 'patronymic') | ||
# ### 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
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