wip
This commit is contained in:
parent
f0f1ce5018
commit
d0b3712f17
18 changed files with 568 additions and 23 deletions
36
migrations/versions/a1cd0a1947be_add_hero_lighting.py
Normal file
36
migrations/versions/a1cd0a1947be_add_hero_lighting.py
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
"""add hero.lighting
|
||||
|
||||
Revision ID: a1cd0a1947be
|
||||
Revises: c79214cdc7b3
|
||||
Create Date: 2023-06-28 19:43:47.108749
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlmodel
|
||||
from learn_sql_model.er_diagram import generate_er_diagram, generate_er_markdown
|
||||
from learn_sql_model.config import get_config
|
||||
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'a1cd0a1947be'
|
||||
down_revision = 'c79214cdc7b3'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('hero', sa.Column('flashlight_strength', sa.Integer(), nullable=True))
|
||||
op.add_column('hero', sa.Column('lanturn_strength', sa.Integer(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
generate_er_diagram(f'migrations/versions/{revision}_er_diagram.png')
|
||||
generate_er_markdown(f'migrations/versions/{revision}_er_diagram.md', f'migrations/versions/er_diagram_{revision}.png')
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('hero', 'lanturn_strength')
|
||||
op.drop_column('hero', 'flashlight_strength')
|
||||
# ### end Alembic commands ###
|
||||
75
migrations/versions/a1cd0a1947be_er_diagram.md
Normal file
75
migrations/versions/a1cd0a1947be_er_diagram.md
Normal file
|
|
@ -0,0 +1,75 @@
|
|||

|
||||
|
||||
---
|
||||
|
||||
## Table: learn_sql_model_alembic_version
|
||||
|
||||
### First 5 rows
|
||||
|
||||
| version_num |
|
||||
|-------------|
|
||||
| c79214cdc7b3 |
|
||||
|
||||
### Columns
|
||||
|
||||
| Column Name | Type | Foreign Key | Example Value |
|
||||
|-------------|------|-------------|---------------|
|
||||
| version_num | VARCHAR(32) | | | |
|
||||
|
||||
### Records Count
|
||||
|
||||
The table learn_sql_model_alembic_version contains 1 records.
|
||||
|
||||
---
|
||||
|
||||
## Table: hero
|
||||
|
||||
### First 5 rows
|
||||
|
||||
| name | secret_name | id | x | y | size | flashlight_strength | lanturn_strength |
|
||||
|------|-------------|----|---|---|------|---------------------|------------------|
|
||||
| deep-insect | unusual-inspection | 1 | 100 | 100 | 25 | None | None |
|
||||
| flat-foundation | personal-incident | 2 | 100 | 100 | 25 | None | None |
|
||||
| formal-cap | mental-substance | 3 | 100 | 100 | 25 | None | None |
|
||||
| political-routine | low-engineer | 4 | 100 | 100 | 25 | None | None |
|
||||
|
||||
### Columns
|
||||
|
||||
| Column Name | Type | Foreign Key | Example Value |
|
||||
|-------------|------|-------------|---------------|
|
||||
| name | VARCHAR | | | |
|
||||
| secret_name | VARCHAR | | | |
|
||||
| id | INTEGER | | | |
|
||||
| x | INTEGER | | | |
|
||||
| y | INTEGER | | | |
|
||||
| size | INTEGER | | | |
|
||||
| flashlight_strength | INTEGER | | | |
|
||||
| lanturn_strength | INTEGER | | | |
|
||||
|
||||
### Records Count
|
||||
|
||||
The table hero contains 4 records.
|
||||
|
||||
---
|
||||
|
||||
## Table: pet
|
||||
|
||||
### First 5 rows
|
||||
|
||||
| name | birthday | id |
|
||||
|------|----------|----|
|
||||
|
||||
### Columns
|
||||
|
||||
| Column Name | Type | Foreign Key | Example Value |
|
||||
|-------------|------|-------------|---------------|
|
||||
| name | VARCHAR | | | |
|
||||
| birthday | DATETIME | | | |
|
||||
| id | INTEGER | | | |
|
||||
|
||||
### Records Count
|
||||
|
||||
The table pet contains 0 records.
|
||||
|
||||
---
|
||||
|
||||
BIN
migrations/versions/a1cd0a1947be_er_diagram.png
Normal file
BIN
migrations/versions/a1cd0a1947be_er_diagram.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
34
migrations/versions/c79214cdc7b3_add_hero_size.py
Normal file
34
migrations/versions/c79214cdc7b3_add_hero_size.py
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
"""add hero.size
|
||||
|
||||
Revision ID: c79214cdc7b3
|
||||
Revises: 3555f61aaa79
|
||||
Create Date: 2023-06-28 11:39:02.606001
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlmodel
|
||||
from learn_sql_model.er_diagram import generate_er_diagram, generate_er_markdown
|
||||
from learn_sql_model.config import get_config
|
||||
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'c79214cdc7b3'
|
||||
down_revision = '3555f61aaa79'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('hero', sa.Column('size', sa.Integer(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
generate_er_diagram(f'migrations/versions/{revision}_er_diagram.png')
|
||||
generate_er_markdown(f'migrations/versions/{revision}_er_diagram.md', f'migrations/versions/er_diagram_{revision}.png')
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('hero', 'size')
|
||||
# ### end Alembic commands ###
|
||||
74
migrations/versions/c79214cdc7b3_er_diagram.md
Normal file
74
migrations/versions/c79214cdc7b3_er_diagram.md
Normal file
|
|
@ -0,0 +1,74 @@
|
|||

|
||||
|
||||
---
|
||||
|
||||
## Table: learn_sql_model_alembic_version
|
||||
|
||||
### First 5 rows
|
||||
|
||||
| version_num |
|
||||
|-------------|
|
||||
| 3555f61aaa79 |
|
||||
|
||||
### Columns
|
||||
|
||||
| Column Name | Type | Foreign Key | Example Value |
|
||||
|-------------|------|-------------|---------------|
|
||||
| version_num | VARCHAR(32) | | | |
|
||||
|
||||
### Records Count
|
||||
|
||||
The table learn_sql_model_alembic_version contains 1 records.
|
||||
|
||||
---
|
||||
|
||||
## Table: hero
|
||||
|
||||
### First 5 rows
|
||||
|
||||
| name | secret_name | id | x | y | size |
|
||||
|------|-------------|----|---|---|------|
|
||||
| tight-gold | successful-health | 1 | 6430 | 6231 | None |
|
||||
| hard-rope | green-research | 2 | 1395 | 2865 | None |
|
||||
| sure-priority | pretty-series | 3 | 2770 | 7835 | None |
|
||||
| huge-library | adult-body | 4 | 656 | 2377 | None |
|
||||
| specific-courage | suspicious-delivery | 5 | 4193 | 9011 | None |
|
||||
|
||||
### Columns
|
||||
|
||||
| Column Name | Type | Foreign Key | Example Value |
|
||||
|-------------|------|-------------|---------------|
|
||||
| name | VARCHAR | | | |
|
||||
| secret_name | VARCHAR | | | |
|
||||
| id | INTEGER | | | |
|
||||
| x | INTEGER | | | |
|
||||
| y | INTEGER | | | |
|
||||
| size | INTEGER | | | |
|
||||
|
||||
### Records Count
|
||||
|
||||
The table hero contains 1572 records.
|
||||
|
||||
---
|
||||
|
||||
## Table: pet
|
||||
|
||||
### First 5 rows
|
||||
|
||||
| name | birthday | id |
|
||||
|------|----------|----|
|
||||
|
||||
### Columns
|
||||
|
||||
| Column Name | Type | Foreign Key | Example Value |
|
||||
|-------------|------|-------------|---------------|
|
||||
| name | VARCHAR | | | |
|
||||
| birthday | DATETIME | | | |
|
||||
| id | INTEGER | | | |
|
||||
|
||||
### Records Count
|
||||
|
||||
The table pet contains 0 records.
|
||||
|
||||
---
|
||||
|
||||
BIN
migrations/versions/c79214cdc7b3_er_diagram.png
Normal file
BIN
migrations/versions/c79214cdc7b3_er_diagram.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 41 KiB |
|
|
@ -0,0 +1,34 @@
|
|||
"""add hero.flashlight_angle
|
||||
|
||||
Revision ID: d79dd8e699d1
|
||||
Revises: e1af975310a1
|
||||
Create Date: 2023-06-28 19:54:19.322431
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlmodel
|
||||
from learn_sql_model.er_diagram import generate_er_diagram, generate_er_markdown
|
||||
from learn_sql_model.config import get_config
|
||||
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'd79dd8e699d1'
|
||||
down_revision = 'e1af975310a1'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('hero', sa.Column('flashlight_angle', sa.Integer(), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
generate_er_diagram(f'migrations/versions/{revision}_er_diagram.png')
|
||||
generate_er_markdown(f'migrations/versions/{revision}_er_diagram.md', f'migrations/versions/er_diagram_{revision}.png')
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('hero', 'flashlight_angle')
|
||||
# ### end Alembic commands ###
|
||||
72
migrations/versions/d79dd8e699d1_er_diagram.md
Normal file
72
migrations/versions/d79dd8e699d1_er_diagram.md
Normal file
|
|
@ -0,0 +1,72 @@
|
|||

|
||||
|
||||
---
|
||||
|
||||
## Table: learn_sql_model_alembic_version
|
||||
|
||||
### First 5 rows
|
||||
|
||||
| version_num |
|
||||
|-------------|
|
||||
| e1af975310a1 |
|
||||
|
||||
### Columns
|
||||
|
||||
| Column Name | Type | Foreign Key | Example Value |
|
||||
|-------------|------|-------------|---------------|
|
||||
| version_num | VARCHAR(32) | | | |
|
||||
|
||||
### Records Count
|
||||
|
||||
The table learn_sql_model_alembic_version contains 1 records.
|
||||
|
||||
---
|
||||
|
||||
## Table: hero
|
||||
|
||||
### First 5 rows
|
||||
|
||||
| name | secret_name | id | x | y | size | flashlight_strength | lanturn_strength | flashlight_angle |
|
||||
|------|-------------|----|---|---|------|---------------------|------------------|------------------|
|
||||
|
||||
### Columns
|
||||
|
||||
| Column Name | Type | Foreign Key | Example Value |
|
||||
|-------------|------|-------------|---------------|
|
||||
| name | VARCHAR | | | |
|
||||
| secret_name | VARCHAR | | | |
|
||||
| id | INTEGER | | | |
|
||||
| x | INTEGER | | | |
|
||||
| y | INTEGER | | | |
|
||||
| size | INTEGER | | | |
|
||||
| flashlight_strength | INTEGER | | | |
|
||||
| lanturn_strength | INTEGER | | | |
|
||||
| flashlight_angle | INTEGER | | | |
|
||||
|
||||
### Records Count
|
||||
|
||||
The table hero contains 0 records.
|
||||
|
||||
---
|
||||
|
||||
## Table: pet
|
||||
|
||||
### First 5 rows
|
||||
|
||||
| name | birthday | id |
|
||||
|------|----------|----|
|
||||
|
||||
### Columns
|
||||
|
||||
| Column Name | Type | Foreign Key | Example Value |
|
||||
|-------------|------|-------------|---------------|
|
||||
| name | VARCHAR | | | |
|
||||
| birthday | DATETIME | | | |
|
||||
| id | INTEGER | | | |
|
||||
|
||||
### Records Count
|
||||
|
||||
The table pet contains 0 records.
|
||||
|
||||
---
|
||||
|
||||
BIN
migrations/versions/d79dd8e699d1_er_diagram.png
Normal file
BIN
migrations/versions/d79dd8e699d1_er_diagram.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
|
|
@ -0,0 +1,34 @@
|
|||
"""add hero.flashlight_angle
|
||||
|
||||
Revision ID: e1af975310a1
|
||||
Revises: a1cd0a1947be
|
||||
Create Date: 2023-06-28 19:53:18.068873
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
import sqlmodel
|
||||
from learn_sql_model.er_diagram import generate_er_diagram, generate_er_markdown
|
||||
from learn_sql_model.config import get_config
|
||||
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'e1af975310a1'
|
||||
down_revision = 'a1cd0a1947be'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
||||
generate_er_diagram(f'migrations/versions/{revision}_er_diagram.png')
|
||||
generate_er_markdown(f'migrations/versions/{revision}_er_diagram.md', f'migrations/versions/er_diagram_{revision}.png')
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
||||
71
migrations/versions/e1af975310a1_er_diagram.md
Normal file
71
migrations/versions/e1af975310a1_er_diagram.md
Normal file
|
|
@ -0,0 +1,71 @@
|
|||

|
||||
|
||||
---
|
||||
|
||||
## Table: learn_sql_model_alembic_version
|
||||
|
||||
### First 5 rows
|
||||
|
||||
| version_num |
|
||||
|-------------|
|
||||
| a1cd0a1947be |
|
||||
|
||||
### Columns
|
||||
|
||||
| Column Name | Type | Foreign Key | Example Value |
|
||||
|-------------|------|-------------|---------------|
|
||||
| version_num | VARCHAR(32) | | | |
|
||||
|
||||
### Records Count
|
||||
|
||||
The table learn_sql_model_alembic_version contains 1 records.
|
||||
|
||||
---
|
||||
|
||||
## Table: hero
|
||||
|
||||
### First 5 rows
|
||||
|
||||
| name | secret_name | id | x | y | size | flashlight_strength | lanturn_strength |
|
||||
|------|-------------|----|---|---|------|---------------------|------------------|
|
||||
|
||||
### Columns
|
||||
|
||||
| Column Name | Type | Foreign Key | Example Value |
|
||||
|-------------|------|-------------|---------------|
|
||||
| name | VARCHAR | | | |
|
||||
| secret_name | VARCHAR | | | |
|
||||
| id | INTEGER | | | |
|
||||
| x | INTEGER | | | |
|
||||
| y | INTEGER | | | |
|
||||
| size | INTEGER | | | |
|
||||
| flashlight_strength | INTEGER | | | |
|
||||
| lanturn_strength | INTEGER | | | |
|
||||
|
||||
### Records Count
|
||||
|
||||
The table hero contains 0 records.
|
||||
|
||||
---
|
||||
|
||||
## Table: pet
|
||||
|
||||
### First 5 rows
|
||||
|
||||
| name | birthday | id |
|
||||
|------|----------|----|
|
||||
|
||||
### Columns
|
||||
|
||||
| Column Name | Type | Foreign Key | Example Value |
|
||||
|-------------|------|-------------|---------------|
|
||||
| name | VARCHAR | | | |
|
||||
| birthday | DATETIME | | | |
|
||||
| id | INTEGER | | | |
|
||||
|
||||
### Records Count
|
||||
|
||||
The table pet contains 0 records.
|
||||
|
||||
---
|
||||
|
||||
BIN
migrations/versions/e1af975310a1_er_diagram.png
Normal file
BIN
migrations/versions/e1af975310a1_er_diagram.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 55 KiB |
Loading…
Add table
Add a link
Reference in a new issue