summaryrefslogtreecommitdiff
path: root/migrations/versions
diff options
context:
space:
mode:
authorMia Herkt <mia@0x0.st>2023-03-29 07:21:36 +0200
committerMia Herkt <mia@0x0.st>2023-03-29 07:36:49 +0200
commit3d1facaec306d453d5749fc49ad6772ebbafff7e (patch)
tree81c34273cf970bf8eb5827c50e532e37ac64101b /migrations/versions
parente00866f5e4a66c18690f0bcdd274d68f3c3d9d0d (diff)
Store user agent with files
Needed for moderation.
Diffstat (limited to 'migrations/versions')
-rw-r--r--migrations/versions/dd0766afb7d2_store_user_agent_string_with_files.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/migrations/versions/dd0766afb7d2_store_user_agent_string_with_files.py b/migrations/versions/dd0766afb7d2_store_user_agent_string_with_files.py
new file mode 100644
index 0000000..4af7680
--- /dev/null
+++ b/migrations/versions/dd0766afb7d2_store_user_agent_string_with_files.py
@@ -0,0 +1,30 @@
+"""Store user agent string with files
+
+Revision ID: dd0766afb7d2
+Revises: 30bfe33aa328
+Create Date: 2023-03-29 07:18:49.113200
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = 'dd0766afb7d2'
+down_revision = '30bfe33aa328'
+
+from alembic import op
+import sqlalchemy as sa
+
+
+def upgrade():
+ # ### commands auto generated by Alembic - please adjust! ###
+ with op.batch_alter_table('file', schema=None) as batch_op:
+ batch_op.add_column(sa.Column('ua', sa.UnicodeText(), nullable=True))
+
+ # ### end Alembic commands ###
+
+
+def downgrade():
+ # ### commands auto generated by Alembic - please adjust! ###
+ with op.batch_alter_table('file', schema=None) as batch_op:
+ batch_op.drop_column('ua')
+
+ # ### end Alembic commands ###