summaryrefslogtreecommitdiffhomepage
path: root/migrations
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2024-10-20 16:45:52 -0400
committerGitHub <[email protected]>2024-10-20 16:45:52 -0400
commit678443f212cb82b795bd0d7db14c845f641bd804 (patch)
tree3b4cc755213e2d87a7351d141f736416f17bf2c8 /migrations
parentf58c86300742d73f656b6a25a5279a7a4f5e0755 (diff)
downloadbazarr-678443f212cb82b795bd0d7db14c845f641bd804.tar.gz
bazarr-678443f212cb82b795bd0d7db14c845f641bd804.zip
Added created and updated timestamp to DB for series, episodes and movies
Diffstat (limited to 'migrations')
-rw-r--r--migrations/versions/8baf97427327_.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/migrations/versions/8baf97427327_.py b/migrations/versions/8baf97427327_.py
new file mode 100644
index 000000000..bb6c7274a
--- /dev/null
+++ b/migrations/versions/8baf97427327_.py
@@ -0,0 +1,34 @@
+"""empty message
+
+Revision ID: 8baf97427327
+Revises: 1e38aa77a491
+Create Date: 2024-10-18 12:57:13.831596
+
+"""
+from alembic import op
+import sqlalchemy as sa
+
+
+# revision identifiers, used by Alembic.
+revision = '8baf97427327'
+down_revision = '1e38aa77a491'
+branch_labels = None
+depends_on = None
+
+
+def upgrade():
+ with op.batch_alter_table('table_episodes', schema=None) as batch_op:
+ batch_op.add_column(sa.Column('created_at_timestamp', sa.DateTime(), nullable=True))
+ batch_op.add_column(sa.Column('updated_at_timestamp', sa.DateTime(), nullable=True))
+
+ with op.batch_alter_table('table_movies', schema=None) as batch_op:
+ batch_op.add_column(sa.Column('created_at_timestamp', sa.DateTime(), nullable=True))
+ batch_op.add_column(sa.Column('updated_at_timestamp', sa.DateTime(), nullable=True))
+
+ with op.batch_alter_table('table_shows', schema=None) as batch_op:
+ batch_op.add_column(sa.Column('created_at_timestamp', sa.DateTime(), nullable=True))
+ batch_op.add_column(sa.Column('updated_at_timestamp', sa.DateTime(), nullable=True))
+
+
+def downgrade():
+ pass