diff --git a/gestao/db/migrations/versions/2023-11-29-23-43_d304dbbb6ffe.py b/gestao/db/migrations/versions/2023-11-29-23-43_d304dbbb6ffe.py index e321cc5..80ad799 100644 --- a/gestao/db/migrations/versions/2023-11-29-23-43_d304dbbb6ffe.py +++ b/gestao/db/migrations/versions/2023-11-29-23-43_d304dbbb6ffe.py @@ -36,9 +36,6 @@ def upgrade(): batch_op.add_column( sa.Column("civilState", sa.String(100), nullable=True), ) - batch_op.add_column( - sa.Column("civilState", sa.String(100), nullable=True), - ) batch_op.add_column( sa.Column("cep", sa.String(100), nullable=True), ) @@ -73,22 +70,22 @@ def upgrade(): sa.Column("admissionDate", sa.Date()), ) batch_op.add_column( - sa.Column("jobRole", sa.string(200), nullable=True), + sa.Column("jobRole", sa.String(200), nullable=True), ) batch_op.add_column( - sa.Column("bodyOfLaw", sa.string(200)), + sa.Column("bodyOfLaw", sa.String(200)), ) batch_op.add_column( - sa.Column("lotation", sa.string(200), nullable=True), + sa.Column("lotation", sa.String(200), nullable=True), ) batch_op.add_column( - sa.Column("workPost", sa.string(200), nullable=True), + sa.Column("workPost", sa.String(200), nullable=True), ) batch_op.add_column( - sa.Column("systemRole", sa.string(200), nullable=True), + sa.Column("systemRole", sa.String(200), nullable=True), ) batch_op.add_column( - sa.Column("password", sa.string(200), nullable=True), + sa.Column("password", sa.String(200), nullable=True), ) diff --git a/gestao/db/migrations/versions/2023-11-30-00-45_0f1bbda43a2b.py b/gestao/db/migrations/versions/2023-11-30-00-45_0f1bbda43a2b.py new file mode 100644 index 0000000..327eb6a --- /dev/null +++ b/gestao/db/migrations/versions/2023-11-30-00-45_0f1bbda43a2b.py @@ -0,0 +1,27 @@ +"""add: religion field + +Revision ID: 0f1bbda43a2b +Revises: d304dbbb6ffe +Create Date: 2023-11-30 00:45:51.838752 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '0f1bbda43a2b' +down_revision = 'd304dbbb6ffe' +branch_labels = None +depends_on = None + + +def upgrade() -> None: + with op.batch_alter_table("user") as batch_op: + batch_op.add_column( + sa.Column("religion", sa.String(200), nullable=True), + ) + + +def downgrade() -> None: + pass diff --git a/gestao/db/migrations/versions/2023-11-30-00-52_284b19912274.py b/gestao/db/migrations/versions/2023-11-30-00-52_284b19912274.py new file mode 100644 index 0000000..0da8216 --- /dev/null +++ b/gestao/db/migrations/versions/2023-11-30-00-52_284b19912274.py @@ -0,0 +1,28 @@ +"""add: religion field + +Revision ID: 284b19912274 +Revises: 0f1bbda43a2b +Create Date: 2023-11-30 00:52:32.940950 + +""" +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision = '284b19912274' +down_revision = '0f1bbda43a2b' +branch_labels = None +depends_on = None + + +def upgrade() -> None: + with op.batch_alter_table("user") as batch_op: + batch_op.add_column( + sa.Column("religion", sa.String(200), nullable=True), + ) + + +def downgrade() -> None: + with op.batch_alter_table("user") as batch_op: + batch_op.drop_column("religion") \ No newline at end of file