-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
design updates and changes to database
- Loading branch information
Showing
30 changed files
with
2,057 additions
and
2,544 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
30 changes: 30 additions & 0 deletions
30
src/airunner/alembic/versions/1bbf5fc3748c_added_brushes_tabel.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 @@ | ||
"""added brushes tabel | ||
Revision ID: 1bbf5fc3748c | ||
Revises: 08fb52568b41 | ||
Create Date: 2023-12-31 10:23:02.460956 | ||
""" | ||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = '1bbf5fc3748c' | ||
down_revision: Union[str, None] = '08fb52568b41' | ||
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! ### | ||
pass | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
pass | ||
# ### end Alembic commands ### |
47 changes: 47 additions & 0 deletions
47
src/airunner/alembic/versions/28d612bd908c_added_generator_settings_override_id_to_.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 @@ | ||
"""Added generator_settings_override_id to settings | ||
Revision ID: 28d612bd908c | ||
Revises: 1bbf5fc3748c | ||
Create Date: 2024-01-01 15:34:54.674668 | ||
""" | ||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = '28d612bd908c' | ||
down_revision: Union[str, None] = '1bbf5fc3748c' | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
with op.batch_alter_table("brushes") as batch_op: | ||
#batch_op.drop_constraint('generator_setting_id', type_='foreignkey') | ||
batch_op.drop_column('generator_setting_id') | ||
|
||
with op.batch_alter_table("generator_settings") as batch_op: | ||
#batch_op.drop_constraint('settings_id', type_='foreignkey') | ||
batch_op.drop_column('settings_id') | ||
|
||
with op.batch_alter_table("settings") as batch_op: | ||
batch_op.create_foreign_key('settings_id', 'generator_settings', ['generator_settings_override_id'], ['id']) | ||
batch_op.drop_column('current_section_shape') | ||
batch_op.drop_column('current_version_kandinsky') | ||
batch_op.drop_column('current_section_kandinsky') | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column('settings', sa.Column('current_section_kandinsky', sa.VARCHAR(), nullable=True)) | ||
op.add_column('settings', sa.Column('current_version_kandinsky', sa.VARCHAR(), nullable=True)) | ||
op.add_column('settings', sa.Column('current_section_shape', sa.VARCHAR(), nullable=True)) | ||
op.drop_constraint(None, 'settings', type_='foreignkey') | ||
op.add_column('generator_settings', sa.Column('settings_id', sa.INTEGER(), nullable=True)) | ||
op.create_foreign_key(None, 'generator_settings', 'settings', ['settings_id'], ['id']) | ||
op.add_column('brushes', sa.Column('generator_setting_id', sa.INTEGER(), nullable=True)) | ||
op.create_foreign_key(None, 'brushes', 'prompt_generator_settings', ['generator_setting_id'], ['id']) | ||
# ### end Alembic commands ### |
30 changes: 30 additions & 0 deletions
30
src/airunner/alembic/versions/6f4472b84071_fixes_brush_link_to_generator_settings.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 @@ | ||
"""Fixes brush link to generator settings | ||
Revision ID: 6f4472b84071 | ||
Revises: d25b0e141c27 | ||
Create Date: 2024-01-01 15:49:27.635195 | ||
""" | ||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = '6f4472b84071' | ||
down_revision: Union[str, None] = 'd25b0e141c27' | ||
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! ### | ||
pass | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
pass | ||
# ### 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,32 @@ | ||
"""Added ids | ||
Revision ID: d25b0e141c27 | ||
Revises: 28d612bd908c | ||
Create Date: 2024-01-01 15:45:14.216904 | ||
""" | ||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = 'd25b0e141c27' | ||
down_revision: Union[str, None] = '28d612bd908c' | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
with op.batch_alter_table("brushes") as batch_op: | ||
batch_op.add_column(sa.Column('generator_setting_id', sa.Integer(), nullable=True)) | ||
batch_op.create_foreign_key('fk_brushes_generator_setting_id', 'generator_settings', ['generator_setting_id'], ['id']) | ||
|
||
# rest of your code | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
pass | ||
# ### 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
Oops, something went wrong.