-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
65 changed files
with
5,818 additions
and
1,387 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
"""init8 | ||
Revision ID: 6333debf3f60 | ||
Revises: 96f8878302f1 | ||
Create Date: 2024-06-14 02:36:42.894511 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
import sqlmodel ##### Required when using sqlmodel and not use sqlalchemy | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '6333debf3f60' | ||
down_revision = '96f8878302f1' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(engine_name): | ||
globals()["upgrade_alltenants"]() | ||
|
||
|
||
def downgrade(engine_name): | ||
globals()["downgrade_alltenants"]() | ||
|
||
|
||
def upgrade_alltenants(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table('image', | ||
sa.Column('tenants', postgresql.ARRAY(sa.String()), nullable=True), | ||
sa.Column('image', sqlmodel.sql.sqltypes.AutoString(), nullable=False), | ||
sa.Column('description', sqlmodel.sql.sqltypes.AutoString(), nullable=True), | ||
sa.Column('creation_ts', sa.DateTime(), nullable=True), | ||
sa.Column('added_by', sqlmodel.sql.sqltypes.AutoString(), nullable=True), | ||
sa.PrimaryKeyConstraint('image') | ||
) | ||
op.create_table('template', | ||
sa.Column('metatags', postgresql.ARRAY(sa.String(), dimensions=1), nullable=True), | ||
sa.Column('permissions', postgresql.ARRAY(sa.String(), dimensions=1), nullable=True), | ||
sa.Column('template_id', sqlmodel.sql.sqltypes.AutoString(), nullable=False), | ||
sa.Column('description', sqlmodel.sql.sqltypes.AutoString(), nullable=True), | ||
sa.Column('archive_message', sqlmodel.sql.sqltypes.AutoString(), nullable=True), | ||
sa.Column('creation_ts', sa.DateTime(), nullable=True), | ||
sa.Column('update_ts', sa.DateTime(), nullable=True), | ||
sa.Column('tenant_id', sqlmodel.sql.sqltypes.AutoString(), nullable=True), | ||
sa.Column('site_id', sqlmodel.sql.sqltypes.AutoString(), nullable=True), | ||
sa.PrimaryKeyConstraint('template_id') | ||
) | ||
op.create_table('templatetag', | ||
sa.Column('pod_definition', sa.JSON(), nullable=True), | ||
sa.Column('template_id', sqlmodel.sql.sqltypes.AutoString(), nullable=False), | ||
sa.Column('commit_message', sqlmodel.sql.sqltypes.AutoString(), nullable=True), | ||
sa.Column('tag', sqlmodel.sql.sqltypes.AutoString(), nullable=True), | ||
sa.Column('tag_timestamp', sqlmodel.sql.sqltypes.AutoString(), nullable=False), | ||
sa.Column('added_by', sqlmodel.sql.sqltypes.AutoString(), nullable=True), | ||
sa.Column('creation_ts', sa.DateTime(), nullable=True), | ||
sa.PrimaryKeyConstraint('tag_timestamp') | ||
) | ||
op.add_column('pod', sa.Column('arguments', postgresql.ARRAY(sa.String()), nullable=True)) | ||
op.add_column('pod', sa.Column('modified_fields', postgresql.ARRAY(sa.String(), dimensions=1), nullable=True, server_default='{}')) | ||
op.add_column('pod', sa.Column('template', sqlmodel.sql.sqltypes.AutoString(), nullable=True, server_default='')) | ||
op.add_column('pod', sa.Column('compute_queue', sqlmodel.sql.sqltypes.AutoString(), nullable=True, server_default='default')) | ||
op.alter_column('pod', 'pod_template', new_column_name='image', existing_type=sqlmodel.sql.sqltypes.AutoString(), nullable=True, server_default='') | ||
op.drop_column('pod', 'data_attached') | ||
op.drop_column('pod', 'roles_inherited') | ||
op.drop_column('pod', 'roles_required') | ||
op.drop_column('pod', 'data_requests') | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade_alltenants(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column('pod', sa.Column('data_requests', postgresql.ARRAY(sa.VARCHAR()), autoincrement=False, nullable=True)) | ||
op.add_column('pod', sa.Column('roles_required', postgresql.ARRAY(sa.VARCHAR()), autoincrement=False, nullable=True)) | ||
op.add_column('pod', sa.Column('roles_inherited', postgresql.ARRAY(sa.VARCHAR()), autoincrement=False, nullable=True)) | ||
op.add_column('pod', sa.Column('data_attached', postgresql.ARRAY(sa.VARCHAR()), autoincrement=False, nullable=True)) | ||
op.alter_column('pod', 'image', new_column_name='pod_template', existing_type=sqlmodel.sql.sqltypes.AutoString(), nullable=False, server_default="") | ||
op.drop_column('pod', 'compute_queue') | ||
op.drop_column('pod', 'template') | ||
op.drop_column('pod', 'modified_fields') | ||
op.drop_column('pod', 'arguments') | ||
op.drop_table('templatetag') | ||
op.drop_table('template') | ||
op.drop_table('image') | ||
# ### 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
"""init7 | ||
Revision ID: 96f8878302f1 | ||
Revises: 4e04cfb7cbbe | ||
Create Date: 2024-06-03 08:32:29.116348 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
import sqlmodel ##### Required when using sqlmodel and not use sqlalchemy | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '96f8878302f1' | ||
down_revision = '4e04cfb7cbbe' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(engine_name): | ||
globals()["upgrade_alltenants"]() | ||
|
||
|
||
def downgrade(engine_name): | ||
globals()["downgrade_alltenants"]() | ||
|
||
|
||
|
||
|
||
def upgrade_alltenants(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_table('template') | ||
|
||
def downgrade_alltenants(): | ||
op.create_table('template') | ||
# ### 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
Oops, something went wrong.