-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: store created_by and updated_by for apps, modelconfigs, and sites
- Loading branch information
Showing
10 changed files
with
115 additions
and
1 deletion.
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
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
52 changes: 52 additions & 0 deletions
52
...migrations/versions/2024_08_25_0441-d0187d6a88dd_add_created_by_and_updated_by_to_app_.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,52 @@ | ||
"""add created_by and updated_by to app, modelconfig, and site | ||
Revision ID: d0187d6a88dd | ||
Revises: 2dbe42621d96 | ||
Create Date: 2024-08-25 04:41:18.157397 | ||
""" | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
import models as models | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "d0187d6a88dd" | ||
down_revision = "2dbe42621d96" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table("app_model_configs", schema=None) as batch_op: | ||
batch_op.add_column(sa.Column("created_by", models.types.StringUUID(), nullable=True)) | ||
batch_op.add_column(sa.Column("updated_by", models.types.StringUUID(), nullable=True)) | ||
|
||
with op.batch_alter_table("apps", schema=None) as batch_op: | ||
batch_op.add_column(sa.Column("created_by", models.types.StringUUID(), nullable=True)) | ||
batch_op.add_column(sa.Column("updated_by", models.types.StringUUID(), nullable=True)) | ||
|
||
with op.batch_alter_table("sites", schema=None) as batch_op: | ||
batch_op.add_column(sa.Column("created_by", models.types.StringUUID(), nullable=True)) | ||
batch_op.add_column(sa.Column("updated_by", models.types.StringUUID(), nullable=True)) | ||
|
||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table("sites", schema=None) as batch_op: | ||
batch_op.drop_column("updated_by") | ||
batch_op.drop_column("created_by") | ||
|
||
with op.batch_alter_table("apps", schema=None) as batch_op: | ||
batch_op.drop_column("updated_by") | ||
batch_op.drop_column("created_by") | ||
|
||
with op.batch_alter_table("app_model_configs", schema=None) as batch_op: | ||
batch_op.drop_column("updated_by") | ||
batch_op.drop_column("created_by") | ||
|
||
# ### 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