|
5 | 5 |
|
6 | 6 |
|
7 | 7 | class Migration(migrations.Migration):
|
8 |
| - |
9 | 8 | dependencies = [
|
10 |
| - ('todo', '0002_remove_old_watchlist_tables'), |
| 9 | + ("todo", "0002_remove_old_watchlist_tables"), |
11 | 10 | ]
|
12 | 11 |
|
13 | 12 | operations = [
|
14 | 13 | migrations.CreateModel(
|
15 |
| - name='PostgresWatchlist', |
| 14 | + name="PostgresWatchlist", |
16 | 15 | fields=[
|
17 |
| - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
18 |
| - ('mongo_id', models.CharField(blank=True, max_length=24, null=True, unique=True)), |
19 |
| - ('task_id', models.CharField(max_length=24)), |
20 |
| - ('user_id', models.CharField(max_length=24)), |
21 |
| - ('is_active', models.BooleanField(default=True)), |
22 |
| - ('created_by', models.CharField(max_length=24)), |
23 |
| - ('created_at', models.DateTimeField(default=django.utils.timezone.now)), |
24 |
| - ('updated_by', models.CharField(blank=True, max_length=24, null=True)), |
25 |
| - ('updated_at', models.DateTimeField(blank=True, null=True)), |
26 |
| - ('last_sync_at', models.DateTimeField(auto_now=True)), |
27 |
| - ('sync_status', models.CharField(choices=[('SYNCED', 'Synced'), ('PENDING', 'Pending'), ('FAILED', 'Failed')], default='SYNCED', max_length=20)), |
28 |
| - ('sync_error', models.TextField(blank=True, null=True)), |
| 16 | + ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), |
| 17 | + ("mongo_id", models.CharField(blank=True, max_length=24, null=True, unique=True)), |
| 18 | + ("task_id", models.CharField(max_length=24)), |
| 19 | + ("user_id", models.CharField(max_length=24)), |
| 20 | + ("is_active", models.BooleanField(default=True)), |
| 21 | + ("created_by", models.CharField(max_length=24)), |
| 22 | + ("created_at", models.DateTimeField(default=django.utils.timezone.now)), |
| 23 | + ("updated_by", models.CharField(blank=True, max_length=24, null=True)), |
| 24 | + ("updated_at", models.DateTimeField(blank=True, null=True)), |
| 25 | + ("last_sync_at", models.DateTimeField(auto_now=True)), |
| 26 | + ( |
| 27 | + "sync_status", |
| 28 | + models.CharField( |
| 29 | + choices=[("SYNCED", "Synced"), ("PENDING", "Pending"), ("FAILED", "Failed")], |
| 30 | + default="SYNCED", |
| 31 | + max_length=20, |
| 32 | + ), |
| 33 | + ), |
| 34 | + ("sync_error", models.TextField(blank=True, null=True)), |
29 | 35 | ],
|
30 | 36 | options={
|
31 |
| - 'db_table': 'postgres_watchlist', |
32 |
| - 'indexes': [models.Index(fields=['mongo_id'], name='postgres_wa_mongo_i_5c0868_idx'), models.Index(fields=['task_id'], name='postgres_wa_task_id_adb0e4_idx'), models.Index(fields=['user_id'], name='postgres_wa_user_id_71c384_idx'), models.Index(fields=['is_active'], name='postgres_wa_is_acti_ae4d9b_idx'), models.Index(fields=['sync_status'], name='postgres_wa_sync_st_29bd9a_idx'), models.Index(fields=['user_id', 'task_id'], name='postgres_wa_user_id_c1421a_idx')], |
33 |
| - 'unique_together': {('user_id', 'task_id')}, |
| 37 | + "db_table": "postgres_watchlist", |
| 38 | + "indexes": [ |
| 39 | + models.Index(fields=["mongo_id"], name="postgres_wa_mongo_i_5c0868_idx"), |
| 40 | + models.Index(fields=["task_id"], name="postgres_wa_task_id_adb0e4_idx"), |
| 41 | + models.Index(fields=["user_id"], name="postgres_wa_user_id_71c384_idx"), |
| 42 | + models.Index(fields=["is_active"], name="postgres_wa_is_acti_ae4d9b_idx"), |
| 43 | + models.Index(fields=["sync_status"], name="postgres_wa_sync_st_29bd9a_idx"), |
| 44 | + models.Index(fields=["user_id", "task_id"], name="postgres_wa_user_id_c1421a_idx"), |
| 45 | + ], |
| 46 | + "unique_together": {("user_id", "task_id")}, |
34 | 47 | },
|
35 | 48 | ),
|
36 | 49 | ]
|
0 commit comments