Chore: Cleaned up old alembic revisions.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -1,51 +0,0 @@
|
||||
"""recipe templates
|
||||
|
||||
Revision ID: 12262aadbc08
|
||||
Revises: a1372ed99c45
|
||||
Create Date: 2023-04-14 07:50:22.110724
|
||||
|
||||
"""
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "12262aadbc08"
|
||||
down_revision = "a1372ed99c45"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table(
|
||||
"recipe_templates",
|
||||
sa.Column("id", sa.Uuid(), nullable=False),
|
||||
sa.Column("name", sa.Unicode(), nullable=False),
|
||||
sa.Column("date", sa.Date(), nullable=False),
|
||||
sa.Column("text", sa.Unicode(), nullable=False),
|
||||
sa.Column("selected", sa.Boolean(), nullable=False),
|
||||
sa.PrimaryKeyConstraint("id", name=op.f("pk_recipe_templates")),
|
||||
sa.UniqueConstraint("name", name=op.f("uq_recipe_templates_name")),
|
||||
)
|
||||
op.create_index(
|
||||
"only_one_selected_template",
|
||||
"recipe_templates",
|
||||
["selected"],
|
||||
unique=True,
|
||||
postgresql_where=sa.text("selected = true"),
|
||||
)
|
||||
op.alter_column("recipes", "notes", existing_type=sa.VARCHAR(length=255), type_=sa.Text(), existing_nullable=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.alter_column("recipes", "notes", existing_type=sa.Text(), type_=sa.VARCHAR(length=255), existing_nullable=False)
|
||||
op.drop_index(
|
||||
"only_one_selected_template", table_name="recipe_templates", postgresql_where=sa.text("selected = true")
|
||||
)
|
||||
op.drop_table("recipe_templates")
|
||||
# ### end Alembic commands ###
|
||||
@ -1,733 +0,0 @@
|
||||
"""Load data
|
||||
|
||||
Revision ID: 185c674cc392
|
||||
Revises: 0bf3d70ee7de
|
||||
Create Date: 2022-10-31 06:23:13.091598
|
||||
|
||||
"""
|
||||
|
||||
from hashlib import md5
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from sqlalchemy import column, func, insert, select, table
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
from alembic import op
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "185c674cc392"
|
||||
down_revision = "0bf3d70ee7de"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
users()
|
||||
roles()
|
||||
permissions()
|
||||
add_all_permissions_to_owner()
|
||||
add_all_roles_to_admin()
|
||||
account_types()
|
||||
cost_centres()
|
||||
accounts()
|
||||
products()
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def users():
|
||||
users = table(
|
||||
"users",
|
||||
column("id", postgresql.UUID()),
|
||||
column("username", sa.String),
|
||||
column("password", sa.String),
|
||||
column("disabled", sa.Boolean),
|
||||
)
|
||||
op.execute(
|
||||
users.insert().values(
|
||||
id="8de98592-76d9-c74d-bb3f-d6184d388b5a",
|
||||
username="Admin",
|
||||
password=md5(b"123456" + b"Salt").hexdigest(),
|
||||
disabled=False,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def roles():
|
||||
roles = table("roles", column("id", postgresql.UUID()), column("name", sa.String))
|
||||
op.execute(
|
||||
roles.insert().values(
|
||||
id="52e08c0c-048a-784f-be10-6e129ad4b5d4",
|
||||
name="Owner",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
roles.insert().values(
|
||||
id="bc4c2d23-437a-984d-abd4-7d5fce677547",
|
||||
name="Accountant",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
roles.insert().values(
|
||||
id="cfc44fa7-3392-5b45-b311-5959333f568f",
|
||||
name="Accounts Manager",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def permissions():
|
||||
permissions = table("permissions", column("id", postgresql.UUID()), column("name", sa.String))
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="09d05434-a09a-fa45-963b-769a2e3fc667",
|
||||
name="Attendance",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="3b099fec-ddc5-4243-b30e-afb78d9ca14a",
|
||||
name="Trial Balance",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="c4d3ae29-420b-ea4c-ae90-00a356263fd9",
|
||||
name="Cash Flow",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="6fcc1a20-6aec-e840-b334-1632b34aeab8",
|
||||
name="Cost Centres",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="c5b7d9d7-f178-0e45-8ea4-bf4e08ec901b",
|
||||
name="Users",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="c3edb554-a057-8942-8030-37b8e926d583",
|
||||
name="Daybook",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="d6675817-ddf5-bf40-9de6-fa223eb4aaa6",
|
||||
name="Edit Posted Vouchers",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="e4edd0ac-7f5d-e64d-8611-73fdc4cd8ba2",
|
||||
name="Employees",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="d9c45323-f997-ba46-9407-8a7145f0828b",
|
||||
name="Fingerprints",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="03b602eb-f58a-b94f-af58-8cb47d7849d0",
|
||||
name="Issue",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="7661388f-62ce-1c41-8e0d-0326ee5d4018",
|
||||
name="Journal",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="f438262f-72dd-2f4e-9186-5abc3af44fba",
|
||||
name="Accounts",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="018a2408-e804-1446-90c5-b015829da6ba",
|
||||
name="Product Ledger",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="b67b2062-5ca7-134f-8258-5d284dd92426",
|
||||
name="Backdated Vouchers",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="36e741da-1a57-b047-a59e-dcd58fcf4338",
|
||||
name="Post Vouchers",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="74fa6d21-eebb-e14c-8153-bebc57190ab4",
|
||||
name="Products",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="08413a22-cf88-fd43-b2b7-365d2951d99f",
|
||||
name="Product Groups",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="0492ebb3-76f3-204e-ab94-bbfe880f0691",
|
||||
name="Profit & Loss",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="12335acb-8630-2d41-a191-1517c8d172de",
|
||||
name="Purchase",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="78a6422b-aa11-174c-9dfa-412a99e87e02",
|
||||
name="Purchase Entries",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="ab33196e-d9e4-114c-ac8c-997954363756",
|
||||
name="Purchase Return",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="ffb7fb65-d42c-424d-9ff1-45069e3b4a29",
|
||||
name="Recipes",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="97515732-24e4-c94d-9585-d4bd7f6c7891",
|
||||
name="Closing Stock",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="a2120944-243f-3f49-be57-0ad633ce4801",
|
||||
name="Ledger",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="d462842b-baf1-2343-95e5-ffdba9bbc163",
|
||||
name="Raw Material Cost",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="a8328891-7ce2-a943-8c29-2eabc1ffeea3",
|
||||
name="Edit Other User's Vouchers",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="cfad44f0-f2a9-7045-89d7-9019cf0f371a",
|
||||
name="Clients",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="92d70e80-1c32-384d-959e-abf84b804696",
|
||||
name="Employee Benefit",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="f586d128-b6d9-4090-a913-78fcbdb68e59",
|
||||
name="Messages",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="d52de0be-9388-4b0b-a359-7e122ab6e53a",
|
||||
name="Lock Date",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="2c40f7cf-67fc-4efa-a670-8d16a2e7884d",
|
||||
name="Net Transactions",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="40deb018-b8f2-460a-88be-8972c9fcdf04",
|
||||
name="Balance Sheet",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="197ebcd2-bc4a-4b65-a138-ce942ece32ea",
|
||||
name="Advanced Delete",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="de204a88-5f9d-4579-a2d6-aa2f25efde42",
|
||||
name="Rebase",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="aecaf82f-aa41-4634-b754-0c1308b621b1",
|
||||
name="Reset Stock",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="a5cb51cb-e38e-4705-84a7-cc1e9a8b866b",
|
||||
name="Reconcile",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="20b707ee-2b59-41ad-be87-76d5fe1efca8",
|
||||
name="Stock Movement",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="cf7019c8-3fd3-45b0-9a42-601029ce5b71",
|
||||
name="Purchases",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="53eecc09-bd06-4890-b6f5-6885dda762d4",
|
||||
name="Dashboard",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="99b56390-96c2-4f3d-8b0f-5ae3c868594f",
|
||||
name="Incentive",
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
permissions.insert().values(
|
||||
id="770532e4-21de-4712-8a6b-4ff9fd63a503",
|
||||
name="Maintenance",
|
||||
)
|
||||
)
|
||||
op.execute(permissions.insert().values(id="f97589c6-df9f-45d3-874d-4245a4d99ade", name="Rate Contracts"))
|
||||
|
||||
|
||||
def add_all_permissions_to_owner():
|
||||
r = table("roles", column("id", postgresql.UUID()), column("name", sa.String))
|
||||
p = table(
|
||||
"permissions",
|
||||
column("id", postgresql.Uuid),
|
||||
column("name", sa.Unicode(length=255)),
|
||||
)
|
||||
rp = table(
|
||||
"role_permissions",
|
||||
column("id", postgresql.Uuid),
|
||||
column("permission_id", postgresql.Uuid),
|
||||
column("role_id", postgresql.Uuid),
|
||||
)
|
||||
op.execute(
|
||||
insert(rp).from_select(
|
||||
[rp.c.id, rp.c.role_id, rp.c.permission_id],
|
||||
select(
|
||||
[
|
||||
sa.text("gen_random_uuid()"),
|
||||
select([func.distinct(r.c.id)]).where(r.c.name.ilike("Owner")).as_scalar(),
|
||||
p.c.id,
|
||||
]
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def add_all_roles_to_admin():
|
||||
u = table("users", column("id", postgresql.UUID()), column("username", sa.String))
|
||||
r = table("roles", column("id", postgresql.UUID()), column("name", sa.String))
|
||||
ur = table(
|
||||
"user_roles",
|
||||
column("id", postgresql.Uuid),
|
||||
column("user_id", postgresql.Uuid),
|
||||
column("role_id", postgresql.Uuid),
|
||||
)
|
||||
op.execute(
|
||||
insert(ur).from_select(
|
||||
[ur.c.id, ur.c.user_id, ur.c.role_id],
|
||||
select(
|
||||
[
|
||||
sa.text("gen_random_uuid()"),
|
||||
select([func.distinct(u.c.id)]).where(u.c.username.ilike("Admin")).as_scalar(),
|
||||
r.c.id,
|
||||
]
|
||||
),
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def account_types():
|
||||
at = table(
|
||||
"account_types",
|
||||
column("id", sa.Integer()),
|
||||
column("name", sa.Unicode(length=255)),
|
||||
column("balance_sheet", sa.Boolean()),
|
||||
column("debit", sa.Boolean()),
|
||||
column("cash_flow_classification", sa.Unicode(length=255)),
|
||||
column("order", sa.Integer()),
|
||||
column("show_in_list", sa.Boolean()),
|
||||
)
|
||||
op.execute(
|
||||
at.insert().values(
|
||||
id=1,
|
||||
name="Cash",
|
||||
balance_sheet=True,
|
||||
debit=True,
|
||||
cash_flow_classification="Cash",
|
||||
order=10000,
|
||||
show_in_list=True,
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
at.insert().values(
|
||||
id=2,
|
||||
name="Purchase",
|
||||
balance_sheet=False,
|
||||
debit=True,
|
||||
cash_flow_classification="Operating",
|
||||
order=20000,
|
||||
show_in_list=True,
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
at.insert().values(
|
||||
id=3,
|
||||
name="Sale",
|
||||
balance_sheet=False,
|
||||
debit=False,
|
||||
cash_flow_classification="Operating",
|
||||
order=10000,
|
||||
show_in_list=True,
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
at.insert().values(
|
||||
id=4,
|
||||
name="Assets",
|
||||
balance_sheet=True,
|
||||
debit=True,
|
||||
cash_flow_classification="Investing",
|
||||
order=20000,
|
||||
show_in_list=True,
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
at.insert().values(
|
||||
id=5,
|
||||
name="Capital",
|
||||
balance_sheet=True,
|
||||
debit=False,
|
||||
cash_flow_classification="Financing",
|
||||
order=70000,
|
||||
show_in_list=True,
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
at.insert().values(
|
||||
id=6,
|
||||
name="Debtors",
|
||||
balance_sheet=True,
|
||||
debit=True,
|
||||
cash_flow_classification="Operating",
|
||||
order=30000,
|
||||
show_in_list=True,
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
at.insert().values(
|
||||
id=7,
|
||||
name="Expenses",
|
||||
balance_sheet=False,
|
||||
debit=True,
|
||||
cash_flow_classification="Operating",
|
||||
order=40000,
|
||||
show_in_list=True,
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
at.insert().values(
|
||||
id=9,
|
||||
name="Creditors",
|
||||
balance_sheet=True,
|
||||
debit=False,
|
||||
cash_flow_classification="Operating",
|
||||
order=60000,
|
||||
show_in_list=True,
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
at.insert().values(
|
||||
id=10,
|
||||
name="Salary",
|
||||
balance_sheet=True,
|
||||
debit=True,
|
||||
cash_flow_classification="Operating",
|
||||
order=40000,
|
||||
show_in_list=False,
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
at.insert().values(
|
||||
id=11,
|
||||
name="Liabilities",
|
||||
balance_sheet=True,
|
||||
debit=False,
|
||||
cash_flow_classification="Operating",
|
||||
order=50000,
|
||||
show_in_list=True,
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
at.insert().values(
|
||||
id=12,
|
||||
name="Revenue",
|
||||
balance_sheet=False,
|
||||
debit=False,
|
||||
cash_flow_classification="Operating",
|
||||
order=30000,
|
||||
show_in_list=True,
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
at.insert().values(
|
||||
id=13,
|
||||
name="Tax",
|
||||
balance_sheet=True,
|
||||
debit=False,
|
||||
cash_flow_classification="Operating",
|
||||
order=80000,
|
||||
show_in_list=True,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def cost_centres():
|
||||
cc = table(
|
||||
"cost_centres",
|
||||
column("id", postgresql.UUID()),
|
||||
column("name", sa.String),
|
||||
sa.Column("is_fixture", sa.Boolean()),
|
||||
)
|
||||
op.execute(cc.insert().values(id="36f59436-522a-0746-ae94-e0f746bf6c0d", name="Overall", is_fixture=True))
|
||||
op.execute(cc.insert().values(id="7b845f95-dfef-fa4a-897c-f0baf15284a3", name="Purchase", is_fixture=True))
|
||||
op.execute(cc.insert().values(id="b2d398ce-e3cc-c542-9feb-5d7783e899df", name="Kitchen", is_fixture=True))
|
||||
|
||||
|
||||
def accounts():
|
||||
acc = table(
|
||||
"accounts",
|
||||
sa.Column("id", postgresql.UUID()),
|
||||
sa.Column("code", sa.Integer()),
|
||||
sa.Column("name", sa.Unicode(length=255)),
|
||||
sa.Column("type", sa.Integer()),
|
||||
sa.Column("account_type", sa.Unicode(length=50)),
|
||||
sa.Column("is_starred", sa.Boolean()),
|
||||
sa.Column("is_active", sa.Boolean()),
|
||||
sa.Column("is_reconcilable", sa.Boolean()),
|
||||
sa.Column("cost_centre_id", postgresql.UUID()),
|
||||
sa.Column("is_fixture", sa.Boolean()),
|
||||
)
|
||||
op.execute(
|
||||
acc.insert().values(
|
||||
code=1,
|
||||
name="All Purchases",
|
||||
type=2,
|
||||
account_type="",
|
||||
is_starred=False,
|
||||
is_active=True,
|
||||
is_reconcilable=False,
|
||||
cost_centre_id="7b845f95-dfef-fa4a-897c-f0baf15284a3",
|
||||
id="240dd899-c413-854c-a7eb-67a29d154490",
|
||||
is_fixture=True,
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
acc.insert().values(
|
||||
code=1,
|
||||
name="Local Purchase",
|
||||
type=9,
|
||||
account_type="",
|
||||
is_starred=False,
|
||||
is_active=True,
|
||||
is_reconcilable=False,
|
||||
cost_centre_id="36f59436-522a-0746-ae94-e0f746bf6c0d",
|
||||
id="d2b75912-505f-2548-9093-466dfff6a0f9",
|
||||
is_fixture=True,
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
acc.insert().values(
|
||||
code=1,
|
||||
name="ESI/PF - Payable",
|
||||
type=11,
|
||||
account_type="",
|
||||
is_starred=False,
|
||||
is_active=True,
|
||||
is_reconcilable=False,
|
||||
cost_centre_id="36f59436-522a-0746-ae94-e0f746bf6c0d",
|
||||
id="42277912-cc18-854b-b134-9f4b00dba419",
|
||||
is_fixture=True,
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
acc.insert().values(
|
||||
code=2,
|
||||
name="ESI/PF - Expense",
|
||||
type=7,
|
||||
account_type="",
|
||||
is_starred=False,
|
||||
is_active=True,
|
||||
is_reconcilable=False,
|
||||
cost_centre_id="36f59436-522a-0746-ae94-e0f746bf6c0d",
|
||||
id="d2a1a286-e900-764b-a1a5-9f4b00dbb940",
|
||||
is_fixture=True,
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
acc.insert().values(
|
||||
code=1,
|
||||
name="Cash in Hand",
|
||||
type=1,
|
||||
account_type="",
|
||||
is_starred=False,
|
||||
is_active=True,
|
||||
is_reconcilable=False,
|
||||
cost_centre_id="36f59436-522a-0746-ae94-e0f746bf6c0d",
|
||||
id="ed2341bb-80b8-9649-90db-f9aaca183bb3",
|
||||
is_fixture=True,
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
acc.insert().values(
|
||||
code=1,
|
||||
name="Staff Salary",
|
||||
type=7,
|
||||
account_type="",
|
||||
is_starred=False,
|
||||
is_active=True,
|
||||
is_reconcilable=False,
|
||||
cost_centre_id="36f59436-522a-0746-ae94-e0f746bf6c0d",
|
||||
id="5c2b54d0-c174-004d-a0d5-92cdaadcefa7",
|
||||
is_fixture=True,
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
acc.insert().values(
|
||||
code=2,
|
||||
name="Incentives",
|
||||
type=11,
|
||||
account_type="",
|
||||
is_starred=False,
|
||||
is_active=True,
|
||||
is_reconcilable=False,
|
||||
cost_centre_id="36f59436-522a-0746-ae94-e0f746bf6c0d",
|
||||
id="b7eff754-e8ba-e047-ab06-9132c15c7640",
|
||||
is_fixture=True,
|
||||
)
|
||||
)
|
||||
op.execute(
|
||||
acc.insert().values(
|
||||
code=1,
|
||||
name="Suspense",
|
||||
type=4,
|
||||
account_type="",
|
||||
is_starred=False,
|
||||
is_active=True,
|
||||
is_reconcilable=False,
|
||||
cost_centre_id="36f59436-522a-0746-ae94-e0f746bf6c0d",
|
||||
id="3854e317-6f3b-5142-ab26-9c44d4cddd08",
|
||||
is_fixture=True,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def products():
|
||||
pg = table(
|
||||
"product_groups",
|
||||
sa.Column("id", postgresql.UUID()),
|
||||
sa.Column("name", sa.Unicode(length=255)),
|
||||
sa.Column("is_fixture", sa.Boolean()),
|
||||
)
|
||||
op.execute(pg.insert().values(id="ae59a20c-87bb-444a-8abb-915ad5e58b83", name="Suspense", is_fixture=True))
|
||||
op.execute(pg.insert().values(id="e6bf81b9-1e9b-499f-81d5-ab5662e9d9b1", name="Semi", is_fixture=True))
|
||||
op.execute(pg.insert().values(id="dad46805-f577-4e5b-8073-9b788e0173fc", name="Menu Items", is_fixture=True))
|
||||
|
||||
p = table(
|
||||
"products",
|
||||
sa.Column("id", postgresql.UUID()),
|
||||
sa.Column("code", sa.Integer()),
|
||||
sa.Column("name", sa.Unicode(length=255)),
|
||||
sa.Column("fraction_units", sa.Unicode(length=255)),
|
||||
sa.Column("product_group_id", postgresql.UUID()),
|
||||
sa.Column("account_id", postgresql.UUID()),
|
||||
sa.Column("is_fixture", sa.Boolean()),
|
||||
sa.Column("is_active", sa.Boolean()),
|
||||
sa.Column("is_fixture", sa.Boolean()),
|
||||
sa.Column("is_purchased", sa.Boolean()),
|
||||
sa.Column("is_sold", sa.Boolean()),
|
||||
)
|
||||
|
||||
op.execute(
|
||||
p.insert().values(
|
||||
id="aa79a643-9ddc-4790-ac7f-a41f9efb4c15",
|
||||
code=1,
|
||||
name="Suspense",
|
||||
fraction_units="X",
|
||||
product_group_id="ae59a20c-87bb-444a-8abb-915ad5e58b83",
|
||||
account_id="240dd899-c413-854c-a7eb-67a29d154490",
|
||||
is_active=False,
|
||||
is_fixture=True,
|
||||
is_purchased=False,
|
||||
is_sold=False,
|
||||
)
|
||||
)
|
||||
|
||||
sku = table(
|
||||
"stock_keeping_units",
|
||||
sa.Column("id", postgresql.UUID()),
|
||||
sa.Column("product_id", postgresql.UUID()),
|
||||
sa.Column("units", sa.Unicode(length=255)),
|
||||
sa.Column("fraction", sa.Numeric(precision=15, scale=5)),
|
||||
sa.Column("product_yield", sa.Numeric(precision=15, scale=5)),
|
||||
sa.Column("cost_price", sa.Numeric(precision=15, scale=5)),
|
||||
sa.Column("sale_price", sa.Numeric(precision=15, scale=5)),
|
||||
)
|
||||
|
||||
op.execute(
|
||||
sku.insert().values(
|
||||
id="aa79a643-9ddc-4790-ac7f-a41f9efb4c15",
|
||||
product_id="aa79a643-9ddc-4790-ac7f-a41f9efb4c15",
|
||||
units="X",
|
||||
fraction=1,
|
||||
product_yield=1,
|
||||
cost_price=0,
|
||||
sale_price=0,
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
pass
|
||||
# ### end Alembic commands ###
|
||||
@ -1,84 +0,0 @@
|
||||
"""nut
|
||||
|
||||
Revision ID: 2438cd581f00
|
||||
Revises: ba0fff092981
|
||||
Create Date: 2023-10-16 16:26:45.922654
|
||||
|
||||
"""
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "2438cd581f00"
|
||||
down_revision = "ba0fff092981"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column(
|
||||
"products", sa.Column("protein", sa.Numeric(precision=15, scale=5), server_default="0", nullable=False)
|
||||
)
|
||||
op.add_column(
|
||||
"products", sa.Column("carbohydrate", sa.Numeric(precision=15, scale=5), server_default="0", nullable=False)
|
||||
)
|
||||
op.add_column(
|
||||
"products", sa.Column("total_sugar", sa.Numeric(precision=15, scale=5), server_default="0", nullable=False)
|
||||
)
|
||||
op.add_column(
|
||||
"products", sa.Column("added_sugar", sa.Numeric(precision=15, scale=5), server_default="0", nullable=False)
|
||||
)
|
||||
op.add_column(
|
||||
"products", sa.Column("total_fat", sa.Numeric(precision=15, scale=5), server_default="0", nullable=False)
|
||||
)
|
||||
op.add_column(
|
||||
"products", sa.Column("saturated_fat", sa.Numeric(precision=15, scale=5), server_default="0", nullable=False)
|
||||
)
|
||||
op.add_column(
|
||||
"products", sa.Column("trans_fat", sa.Numeric(precision=15, scale=5), server_default="0", nullable=False)
|
||||
)
|
||||
op.add_column(
|
||||
"products", sa.Column("cholestrol", sa.Numeric(precision=15, scale=5), server_default="0", nullable=False)
|
||||
)
|
||||
op.add_column(
|
||||
"products", sa.Column("sodium", sa.Numeric(precision=15, scale=5), server_default="0", nullable=False)
|
||||
)
|
||||
op.add_column("products", sa.Column("msnf", sa.Numeric(precision=15, scale=5), server_default="0", nullable=False))
|
||||
op.add_column(
|
||||
"products", sa.Column("other_solids", sa.Numeric(precision=15, scale=5), server_default="0", nullable=False)
|
||||
)
|
||||
op.add_column(
|
||||
"products", sa.Column("total_solids", sa.Numeric(precision=15, scale=5), server_default="0", nullable=False)
|
||||
)
|
||||
op.add_column("products", sa.Column("water", sa.Numeric(precision=15, scale=5), server_default="0", nullable=False))
|
||||
|
||||
op.add_column(
|
||||
"product_groups", sa.Column("nutritional", sa.Boolean(), server_default=sa.text("false"), nullable=False)
|
||||
)
|
||||
op.add_column(
|
||||
"product_groups", sa.Column("ice_cream", sa.Boolean(), server_default=sa.text("false"), nullable=False)
|
||||
)
|
||||
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("products", "water")
|
||||
op.drop_column("products", "total_solids")
|
||||
op.drop_column("products", "other_solids")
|
||||
op.drop_column("products", "msnf")
|
||||
op.drop_column("products", "sodium")
|
||||
op.drop_column("products", "cholestrol")
|
||||
op.drop_column("products", "trans_fat")
|
||||
op.drop_column("products", "saturated_fat")
|
||||
op.drop_column("products", "total_fat")
|
||||
op.drop_column("products", "added_sugar")
|
||||
op.drop_column("products", "total_sugar")
|
||||
op.drop_column("products", "carbohydrate")
|
||||
op.drop_column("products", "protein")
|
||||
# ### end Alembic commands ###
|
||||
@ -1,24 +0,0 @@
|
||||
"""Fingerprint Index
|
||||
|
||||
Revision ID: 48af31eb6f3f
|
||||
Revises: 12262aadbc08
|
||||
Create Date: 2023-08-07 13:01:05.401492
|
||||
|
||||
"""
|
||||
|
||||
from alembic import op
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "48af31eb6f3f"
|
||||
down_revision = "12262aadbc08"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.create_unique_constraint(op.f("uq_fingerprints_date"), "fingerprints", ["date", "employee_id"])
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_constraint(op.f("uq_fingerprints_date"), "fingerprints", type_="unique")
|
||||
@ -1,30 +0,0 @@
|
||||
"""allergen
|
||||
|
||||
Revision ID: 66abfc21db73
|
||||
Revises: 2438cd581f00
|
||||
Create Date: 2023-12-28 12:45:01.275322
|
||||
|
||||
"""
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "66abfc21db73"
|
||||
down_revision = "2438cd581f00"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column("products", sa.Column("allergen", sa.Text(), server_default="", nullable=False))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column("products", "allergen")
|
||||
# ### end Alembic commands ###
|
||||
@ -1,177 +0,0 @@
|
||||
"""Recipe upgrade
|
||||
|
||||
Revision ID: a1372ed99c45
|
||||
Revises: 185c674cc392
|
||||
Create Date: 2023-03-31 05:03:40.408240
|
||||
|
||||
"""
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from sqlalchemy import func
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
from alembic import op
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "a1372ed99c45"
|
||||
down_revision = "185c674cc392"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table(
|
||||
"tags",
|
||||
sa.Column("id", sa.Uuid(), nullable=False),
|
||||
sa.Column("name", sa.Unicode(), nullable=False),
|
||||
sa.PrimaryKeyConstraint("id", name=op.f("pk_tags")),
|
||||
sa.UniqueConstraint("name", name=op.f("uq_tags_name")),
|
||||
)
|
||||
op.create_table(
|
||||
"recipe_tags",
|
||||
sa.Column("id", sa.Uuid(), nullable=False),
|
||||
sa.Column("recipe_id", sa.Uuid(), nullable=False),
|
||||
sa.Column("tag_id", sa.Uuid(), nullable=False),
|
||||
sa.ForeignKeyConstraint(["recipe_id"], ["recipes.id"], name=op.f("fk_recipe_tags_recipe_id_recipes")),
|
||||
sa.ForeignKeyConstraint(["tag_id"], ["tags.id"], name=op.f("fk_recipe_tags_tag_id_tags")),
|
||||
sa.PrimaryKeyConstraint("id", name=op.f("pk_recipe_tags")),
|
||||
sa.UniqueConstraint("recipe_id", "tag_id", name=op.f("uq_recipe_tags_recipe_id")),
|
||||
)
|
||||
op.alter_column("attendances", "employee_id", existing_type=sa.UUID(), nullable=False)
|
||||
op.alter_column("attendances", "attendance_type", existing_type=sa.INTEGER(), nullable=False)
|
||||
op.alter_column("attendances", "amount", existing_type=sa.NUMERIC(precision=5, scale=2), nullable=False)
|
||||
op.alter_column("attendances", "creation_date", existing_type=postgresql.TIMESTAMP(), nullable=False)
|
||||
op.alter_column("attendances", "user_id", existing_type=sa.UUID(), nullable=False)
|
||||
op.alter_column("attendances", "is_valid", existing_type=sa.BOOLEAN(), nullable=False)
|
||||
op.alter_column("cost_centres", "name", existing_type=sa.VARCHAR(length=255), nullable=False)
|
||||
op.alter_column("employee_benefit", "gross_salary", existing_type=sa.INTEGER(), nullable=False)
|
||||
op.alter_column("employee_benefit", "days_worked", existing_type=sa.INTEGER(), nullable=False)
|
||||
op.alter_column("employee_benefit", "esi_employee", existing_type=sa.INTEGER(), nullable=False)
|
||||
op.alter_column("employee_benefit", "pf_employee", existing_type=sa.INTEGER(), nullable=False)
|
||||
op.alter_column("employee_benefit", "esi_employer", existing_type=sa.INTEGER(), nullable=False)
|
||||
op.alter_column("employee_benefit", "pf_employer", existing_type=sa.INTEGER(), nullable=False)
|
||||
op.alter_column("fingerprints", "employee_id", existing_type=sa.UUID(), nullable=False)
|
||||
op.alter_column("fingerprints", "date", existing_type=postgresql.TIMESTAMP(), nullable=False)
|
||||
op.alter_column("permissions", "name", existing_type=sa.VARCHAR(length=255), nullable=False)
|
||||
op.alter_column("product_groups", "name", existing_type=sa.VARCHAR(length=255), nullable=False)
|
||||
op.add_column("products", sa.Column("description", sa.Text(), nullable=True))
|
||||
op.alter_column("products", "code", existing_type=sa.INTEGER(), nullable=False)
|
||||
op.add_column("recipes", sa.Column("date", sa.Date(), nullable=False, server_default=func.now()))
|
||||
op.add_column("recipes", sa.Column("source", sa.Text(), nullable=False, server_default=""))
|
||||
op.add_column("recipes", sa.Column("instructions", sa.Text(), nullable=False, server_default=""))
|
||||
op.add_column("recipes", sa.Column("garnishing", sa.Text(), nullable=False, server_default=""))
|
||||
op.add_column("recipes", sa.Column("plating", sa.Text(), nullable=False, server_default=""))
|
||||
op.drop_constraint(op.f("uq_recipes_sku_id"), "recipes", type_="unique")
|
||||
op.alter_column("recipes", "notes", existing_type=sa.VARCHAR(length=255), type=sa.Text(), nullable=False)
|
||||
op.create_unique_constraint(op.f("uq_recipes_sku_id"), "recipes", ["sku_id", "date"])
|
||||
op.create_index(op.f("ix_recipes_date"), "recipes", ["date"], unique=False)
|
||||
op.drop_constraint("fk_recipes_period_id_periods", "recipes", type_="foreignkey")
|
||||
op.drop_column("recipes", "period_id")
|
||||
op.drop_column("recipes", "sale_price")
|
||||
op.drop_column("recipes", "cost_price")
|
||||
op.add_column("recipe_items", sa.Column("description", sa.Text(), nullable=False, server_default=""))
|
||||
op.drop_column("recipe_items", "price")
|
||||
op.alter_column("role_permissions", "permission_id", existing_type=sa.UUID(), nullable=False)
|
||||
op.alter_column("role_permissions", "role_id", existing_type=sa.UUID(), nullable=False)
|
||||
op.create_unique_constraint(
|
||||
op.f("uq_role_permissions_permission_id"), "role_permissions", ["permission_id", "role_id"]
|
||||
)
|
||||
op.alter_column("roles", "name", existing_type=sa.VARCHAR(length=255), nullable=False)
|
||||
op.alter_column("settings", "data", existing_type=postgresql.BYTEA(), nullable=False)
|
||||
op.alter_column("user_roles", "user_id", existing_type=sa.UUID(), nullable=False)
|
||||
op.alter_column("user_roles", "role_id", existing_type=sa.UUID(), nullable=False)
|
||||
op.create_unique_constraint(op.f("uq_user_roles_user_id"), "user_roles", ["user_id", "role_id"])
|
||||
op.alter_column("users", "username", existing_type=sa.VARCHAR(length=255), nullable=False)
|
||||
op.alter_column("users", "password", existing_type=sa.VARCHAR(length=60), nullable=False)
|
||||
op.alter_column("users", "disabled", existing_type=sa.BOOLEAN(), nullable=False)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.alter_column(
|
||||
"vouchers",
|
||||
"voucher_type",
|
||||
existing_type=sa.Enum(
|
||||
"JOURNAL",
|
||||
"PURCHASE",
|
||||
"ISSUE",
|
||||
"PAYMENT",
|
||||
"RECEIPT",
|
||||
"PURCHASE_RETURN",
|
||||
"OPENING_ACCOUNTS",
|
||||
"OPENING_BATCHES",
|
||||
"CLOSING_STOCK",
|
||||
"OPENING_BALANCE",
|
||||
"CLOSING_BALANCE",
|
||||
"EMPLOYEE_BENEFIT",
|
||||
"INCENTIVE",
|
||||
name="vouchertype",
|
||||
),
|
||||
type_=postgresql.ENUM(
|
||||
"JOURNAL",
|
||||
"PURCHASE",
|
||||
"ISSUE",
|
||||
"PAYMENT",
|
||||
"RECEIPT",
|
||||
"PURCHASE_RETURN",
|
||||
"OPENING_ACCOUNTS",
|
||||
"OPENING_BATCHES",
|
||||
"CLOSING_STOCK",
|
||||
"OPENING_BALANCE",
|
||||
"CLOSING_BALANCE",
|
||||
"EMPLOYEE_BENEFIT",
|
||||
"INCENTIVE",
|
||||
name="voucher_type",
|
||||
),
|
||||
existing_nullable=False,
|
||||
)
|
||||
op.alter_column("users", "disabled", existing_type=sa.BOOLEAN(), nullable=True)
|
||||
op.alter_column("users", "username", existing_type=sa.VARCHAR(length=255), nullable=True)
|
||||
op.drop_constraint(op.f("uq_user_roles_user_id"), "user_roles", type_="unique")
|
||||
op.alter_column("user_roles", "role_id", existing_type=sa.UUID(), nullable=True)
|
||||
op.alter_column("user_roles", "user_id", existing_type=sa.UUID(), nullable=True)
|
||||
op.alter_column(
|
||||
"settings",
|
||||
"setting_type",
|
||||
existing_type=sa.Enum("VOUCHER_LOCK", "MAINTENANCE_MODE", name="settingtype"),
|
||||
type_=postgresql.ENUM("VOUCHER_LOCK", name="setting_type"),
|
||||
existing_nullable=False,
|
||||
)
|
||||
op.alter_column("settings", "data", existing_type=postgresql.BYTEA(), nullable=True)
|
||||
op.alter_column("roles", "name", existing_type=sa.VARCHAR(length=255), nullable=True)
|
||||
op.drop_constraint(op.f("uq_role_permissions_permission_id"), "role_permissions", type_="unique")
|
||||
op.alter_column("role_permissions", "role_id", existing_type=sa.UUID(), nullable=True)
|
||||
op.alter_column("role_permissions", "permission_id", existing_type=sa.UUID(), nullable=True)
|
||||
op.drop_index(op.f("ix_recipes_date"), table_name="recipes")
|
||||
op.alter_column("recipes", "notes", existing_type=sa.VARCHAR(length=255), nullable=True)
|
||||
op.drop_column("recipes", "plating")
|
||||
op.drop_column("recipes", "garnishing")
|
||||
op.drop_column("recipes", "instructions")
|
||||
op.drop_column("recipes", "source")
|
||||
op.drop_column("recipes", "date")
|
||||
op.alter_column("products", "code", existing_type=sa.INTEGER(), nullable=True)
|
||||
op.drop_column("products", "description")
|
||||
op.alter_column("product_groups", "name", existing_type=sa.VARCHAR(length=255), nullable=True)
|
||||
op.alter_column("permissions", "name", existing_type=sa.VARCHAR(length=255), nullable=True)
|
||||
op.alter_column("fingerprints", "date", existing_type=postgresql.TIMESTAMP(), nullable=True)
|
||||
op.alter_column("fingerprints", "employee_id", existing_type=sa.UUID(), nullable=True)
|
||||
op.alter_column("employee_benefit", "pf_employer", existing_type=sa.INTEGER(), nullable=True)
|
||||
op.alter_column("employee_benefit", "esi_employer", existing_type=sa.INTEGER(), nullable=True)
|
||||
op.alter_column("employee_benefit", "pf_employee", existing_type=sa.INTEGER(), nullable=True)
|
||||
op.alter_column("employee_benefit", "esi_employee", existing_type=sa.INTEGER(), nullable=True)
|
||||
op.alter_column("employee_benefit", "days_worked", existing_type=sa.INTEGER(), nullable=True)
|
||||
op.alter_column("employee_benefit", "gross_salary", existing_type=sa.INTEGER(), nullable=True)
|
||||
op.alter_column("cost_centres", "name", existing_type=sa.VARCHAR(length=255), nullable=True)
|
||||
op.alter_column("attendances", "is_valid", existing_type=sa.BOOLEAN(), nullable=True)
|
||||
op.alter_column("attendances", "user_id", existing_type=sa.UUID(), nullable=True)
|
||||
op.alter_column("attendances", "creation_date", existing_type=postgresql.TIMESTAMP(), nullable=True)
|
||||
op.alter_column("attendances", "amount", existing_type=sa.NUMERIC(precision=5, scale=2), nullable=True)
|
||||
op.alter_column("attendances", "attendance_type", existing_type=sa.INTEGER(), nullable=True)
|
||||
op.alter_column("attendances", "employee_id", existing_type=sa.UUID(), nullable=True)
|
||||
op.drop_table("recipe_tags")
|
||||
op.drop_table("tags")
|
||||
# ### end Alembic commands ###
|
||||
@ -1,40 +0,0 @@
|
||||
"""price
|
||||
|
||||
Revision ID: ba0fff092981
|
||||
Revises: 48af31eb6f3f
|
||||
Create Date: 2023-08-11 18:12:51.293741
|
||||
|
||||
"""
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "ba0fff092981"
|
||||
down_revision = "48af31eb6f3f"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table(
|
||||
"prices",
|
||||
sa.Column("id", sa.Uuid(), nullable=False),
|
||||
sa.Column("period_id", sa.Uuid(), nullable=False),
|
||||
sa.Column("product_id", sa.Uuid(), nullable=False),
|
||||
sa.Column("price", sa.Numeric(precision=15, scale=2), nullable=False),
|
||||
sa.ForeignKeyConstraint(["period_id"], ["periods.id"], name=op.f("fk_prices_period_id_periods")),
|
||||
sa.ForeignKeyConstraint(["product_id"], ["products.id"], name=op.f("fk_prices_product_id_products")),
|
||||
sa.PrimaryKeyConstraint("id", name=op.f("pk_prices")),
|
||||
sa.UniqueConstraint("period_id", "product_id", name=op.f("uq_prices_period_id")),
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table("prices")
|
||||
# ### end Alembic commands ###
|
||||
@ -13,13 +13,12 @@ from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "c460289ba94d"
|
||||
down_revision = "66abfc21db73"
|
||||
down_revision = "0bf3d70ee7de"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_table(
|
||||
"voucher_tags",
|
||||
sa.Column("id", sa.Uuid(), nullable=False),
|
||||
@ -34,6 +33,5 @@ def upgrade():
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_table("voucher_tags")
|
||||
# ### end Alembic commands ###
|
||||
|
||||
Reference in New Issue
Block a user