|
15 | 15 | branch_labels = None |
16 | 16 | depends_on = None |
17 | 17 |
|
18 | | -# migrations generated manually! Alembic did not these detect changes. |
| 18 | +# migrations generated manually! Alembic did not detect these changes. |
19 | 19 |
|
20 | 20 | def upgrade(): |
21 | 21 | # User table constraints |
22 | 22 | with op.batch_alter_table('user', schema=None) as batch_op: |
23 | | - batch_op.create_check_constraint(batch_op.f('user_email_non_empty_check'), "trim(email) <> ''") |
24 | | - batch_op.create_check_constraint(batch_op.f('user_email_normalized_non_empty_check'), "trim(email_normalized) <> ''") |
25 | | - batch_op.create_check_constraint(batch_op.f('user_password_hash_non_empty_check'), "trim(password_hash) <> ''") |
| 23 | + batch_op.create_check_constraint(batch_op.f('user_email_non_empty_check'), "trim(email) != ''") |
| 24 | + batch_op.create_check_constraint(batch_op.f('user_email_normalized_non_empty_check'), "trim(email_normalized) != ''") |
| 25 | + batch_op.create_check_constraint(batch_op.f('user_password_hash_non_empty_check'), "trim(password_hash) != ''") |
26 | 26 |
|
27 | 27 | # Category table constraint |
28 | 28 | with op.batch_alter_table('category', schema=None) as batch_op: |
29 | | - batch_op.create_check_constraint(batch_op.f('category_name_non_empty_check'), "trim(name) <> ''") |
| 29 | + batch_op.create_check_constraint(batch_op.f('category_name_non_empty_check'), "trim(name) != ''") |
30 | 30 |
|
31 | 31 | # Subcategory table constraint |
32 | 32 | with op.batch_alter_table('subcategory', schema=None) as batch_op: |
33 | | - batch_op.create_check_constraint(batch_op.f('subcategory_name_non_empty_check'), "trim(name) <> ''") |
| 33 | + batch_op.create_check_constraint(batch_op.f('subcategory_name_non_empty_check'), "trim(name) != ''") |
34 | 34 |
|
35 | 35 | # Product table constraint |
36 | 36 | with op.batch_alter_table('product', schema=None) as batch_op: |
37 | | - batch_op.create_check_constraint(batch_op.f('product_name_non_empty_check'), "trim(name) <> ''") |
| 37 | + batch_op.create_check_constraint(batch_op.f('product_name_non_empty_check'), "trim(name) != ''") |
38 | 38 |
|
39 | 39 |
|
40 | 40 | def downgrade(): |
|
0 commit comments