File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
packages/postgres-database/src/simcore_postgres_database Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ """add index to checksum
2
+
3
+ Revision ID: 1c069f85d5fd
4
+ Revises: b13ca15c7ef8
5
+ Create Date: 2024-04-26 11:46:55.745033+00:00
6
+
7
+ """
8
+ from alembic import op
9
+
10
+ # revision identifiers, used by Alembic.
11
+ revision = "1c069f85d5fd"
12
+ down_revision = "b13ca15c7ef8"
13
+ branch_labels = None
14
+ depends_on = None
15
+
16
+
17
+ def upgrade ():
18
+ # ### commands auto generated by Alembic - please adjust! ###
19
+ op .create_index (
20
+ op .f ("ix_file_meta_data_sha256_checksum" ),
21
+ "file_meta_data" ,
22
+ ["sha256_checksum" ],
23
+ unique = False ,
24
+ )
25
+ # ### end Alembic commands ###
26
+
27
+
28
+ def downgrade ():
29
+ # ### commands auto generated by Alembic - please adjust! ###
30
+ op .drop_index (
31
+ op .f ("ix_file_meta_data_sha256_checksum" ), table_name = "file_meta_data"
32
+ )
33
+ # ### end Alembic commands ###
Original file line number Diff line number Diff line change 54
54
nullable = True ,
55
55
server_default = sa .null (),
56
56
doc = "SHA256 checksum of the file content" ,
57
+ index = True ,
57
58
),
58
59
)
You can’t perform that action at this time.
0 commit comments