diff --git a/src/migrations/20260811_155116_add_lembranca_support_status.json b/src/migrations/20260811_155116_add_lembranca_support_status.json index b2213084..329c7620 100644 --- a/src/migrations/20260811_155116_add_lembranca_support_status.json +++ b/src/migrations/20260811_155116_add_lembranca_support_status.json @@ -6654,6 +6654,136 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "public.google_calendar_sync": { + "name": "google_calendar_sync", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "calendar_id": { + "name": "calendar_id", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "disabled_at": { + "name": "disabled_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "last_synced_at": { + "name": "last_synced_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "last_success_at": { + "name": "last_success_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "last_error_at": { + "name": "last_error_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "last_error": { + "name": "last_error", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "google_calendar_sync_calendar_id_idx": { + "name": "google_calendar_sync_calendar_id_idx", + "columns": [ + { + "expression": "calendar_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "google_calendar_sync_disabled_at_idx": { + "name": "google_calendar_sync_disabled_at_idx", + "columns": [ + { + "expression": "disabled_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "google_calendar_sync_updated_at_idx": { + "name": "google_calendar_sync_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "google_calendar_sync_created_at_idx": { + "name": "google_calendar_sync_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "public.election_tally": { "name": "election_tally", "schema": "", @@ -10776,6 +10906,12 @@ "primaryKey": false, "notNull": false }, + "google_calendar_sync_id": { + "name": "google_calendar_sync_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, "election_tally_id": { "name": "election_tally_id", "type": "integer", @@ -11174,6 +11310,21 @@ "method": "btree", "with": {} }, + "payload_locked_documents_rels_google_calendar_sync_id_idx": { + "name": "payload_locked_documents_rels_google_calendar_sync_id_idx", + "columns": [ + { + "expression": "google_calendar_sync_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, "payload_locked_documents_rels_election_tally_id_idx": { "name": "payload_locked_documents_rels_election_tally_id_idx", "columns": [ @@ -11601,6 +11752,19 @@ "onDelete": "cascade", "onUpdate": "no action" }, + "payload_locked_documents_rels_google_calendar_sync_fk": { + "name": "payload_locked_documents_rels_google_calendar_sync_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "google_calendar_sync", + "columnsFrom": [ + "google_calendar_sync_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, "payload_locked_documents_rels_election_tally_fk": { "name": "payload_locked_documents_rels_election_tally_fk", "tableFrom": "payload_locked_documents_rels", @@ -13333,6 +13497,6 @@ "tables": {}, "columns": {} }, - "id": "17d89cfa-69b8-4d52-af52-dc4c24d017a5", + "id": "994374af-56a6-42f7-a4c2-907da32cbe60", "prevId": "00000000-0000-0000-0000-000000000000" } \ No newline at end of file diff --git a/src/migrations/index.ts b/src/migrations/index.ts index 9fb3ae11..6782c7bf 100644 --- a/src/migrations/index.ts +++ b/src/migrations/index.ts @@ -48,6 +48,7 @@ import * as migration_20260808_184113_remodel_activity_responsible from './20260 import * as migration_20260809_204728_add_campaign_user_contact_and_leadership_advisors from './20260809_204728_add_campaign_user_contact_and_leadership_advisors'; import * as migration_20260810_010844_add_activity_all_day from './20260810_010844_add_activity_all_day'; import * as migration_20260811_111828_add_contact_phones_array from './20260811_111828_add_contact_phones_array'; +import * as migration_20260811_133332_add_google_calendar_sync from './20260811_133332_add_google_calendar_sync'; import * as migration_20260811_155116_add_lembranca_support_status from './20260811_155116_add_lembranca_support_status'; export const migrations = [ @@ -301,9 +302,14 @@ export const migrations = [ down: migration_20260811_111828_add_contact_phones_array.down, name: '20260811_111828_add_contact_phones_array', }, + { + up: migration_20260811_133332_add_google_calendar_sync.up, + down: migration_20260811_133332_add_google_calendar_sync.down, + name: '20260811_133332_add_google_calendar_sync', + }, { up: migration_20260811_155116_add_lembranca_support_status.up, down: migration_20260811_155116_add_lembranca_support_status.down, - name: '20260811_155116_add_lembranca_support_status' + name: '20260811_155116_add_lembranca_support_status', }, ];