From e25b58fbd3097e08b36e94789f1e5598ab6811fb Mon Sep 17 00:00:00 2001 From: Paul Popus Date: Tue, 3 Dec 2024 20:44:43 -0600 Subject: [PATCH] fix(templates): vercel migrations --- ...tial.json => 20241204_024245_initial.json} | 53 ++++++++++++++++++- ..._initial.ts => 20241204_024245_initial.ts} | 9 +++- .../src/migrations/index.ts | 8 +-- 3 files changed, 64 insertions(+), 6 deletions(-) rename templates/with-vercel-website/src/migrations/{20241203_192242_initial.json => 20241204_024245_initial.json} (99%) rename templates/with-vercel-website/src/migrations/{20241203_192242_initial.ts => 20241204_024245_initial.ts} (99%) diff --git a/templates/with-vercel-website/src/migrations/20241203_192242_initial.json b/templates/with-vercel-website/src/migrations/20241204_024245_initial.json similarity index 99% rename from templates/with-vercel-website/src/migrations/20241203_192242_initial.json rename to templates/with-vercel-website/src/migrations/20241204_024245_initial.json index 72d01bc9943..a925e0d8826 100644 --- a/templates/with-vercel-website/src/migrations/20241203_192242_initial.json +++ b/templates/with-vercel-website/src/migrations/20241204_024245_initial.json @@ -1,5 +1,5 @@ { - "id": "4cf463a4-5305-48e4-9938-2b1ffea91fda", + "id": "cd3bdd6a-6b91-41eb-86ea-c2542d3d852d", "prevId": "00000000-0000-0000-0000-000000000000", "version": "7", "dialect": "postgresql", @@ -4139,6 +4139,42 @@ "type": "varchar", "primaryKey": false, "notNull": false + }, + "sizes_og_url": { + "name": "sizes_og_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_og_width": { + "name": "sizes_og_width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_og_height": { + "name": "sizes_og_height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_og_mime_type": { + "name": "sizes_og_mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_og_filesize": { + "name": "sizes_og_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_og_filename": { + "name": "sizes_og_filename", + "type": "varchar", + "primaryKey": false, + "notNull": false } }, "indexes": { @@ -4276,6 +4312,21 @@ "concurrently": false, "method": "btree", "with": {} + }, + "media_sizes_og_sizes_og_filename_idx": { + "name": "media_sizes_og_sizes_og_filename_idx", + "columns": [ + { + "expression": "sizes_og_filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} } }, "foreignKeys": {}, diff --git a/templates/with-vercel-website/src/migrations/20241203_192242_initial.ts b/templates/with-vercel-website/src/migrations/20241204_024245_initial.ts similarity index 99% rename from templates/with-vercel-website/src/migrations/20241203_192242_initial.ts rename to templates/with-vercel-website/src/migrations/20241204_024245_initial.ts index bb66beb2813..c7f7dcb8649 100644 --- a/templates/with-vercel-website/src/migrations/20241203_192242_initial.ts +++ b/templates/with-vercel-website/src/migrations/20241204_024245_initial.ts @@ -387,7 +387,13 @@ export async function up({ payload, req }: MigrateUpArgs): Promise { "sizes_xlarge_height" numeric, "sizes_xlarge_mime_type" varchar, "sizes_xlarge_filesize" numeric, - "sizes_xlarge_filename" varchar + "sizes_xlarge_filename" varchar, + "sizes_og_url" varchar, + "sizes_og_width" numeric, + "sizes_og_height" numeric, + "sizes_og_mime_type" varchar, + "sizes_og_filesize" numeric, + "sizes_og_filename" varchar ); CREATE TABLE IF NOT EXISTS "categories_breadcrumbs" ( @@ -1356,6 +1362,7 @@ export async function up({ payload, req }: MigrateUpArgs): Promise { CREATE INDEX IF NOT EXISTS "media_sizes_medium_sizes_medium_filename_idx" ON "media" USING btree ("sizes_medium_filename"); CREATE INDEX IF NOT EXISTS "media_sizes_large_sizes_large_filename_idx" ON "media" USING btree ("sizes_large_filename"); CREATE INDEX IF NOT EXISTS "media_sizes_xlarge_sizes_xlarge_filename_idx" ON "media" USING btree ("sizes_xlarge_filename"); + CREATE INDEX IF NOT EXISTS "media_sizes_og_sizes_og_filename_idx" ON "media" USING btree ("sizes_og_filename"); CREATE INDEX IF NOT EXISTS "categories_breadcrumbs_order_idx" ON "categories_breadcrumbs" USING btree ("_order"); CREATE INDEX IF NOT EXISTS "categories_breadcrumbs_parent_id_idx" ON "categories_breadcrumbs" USING btree ("_parent_id"); CREATE INDEX IF NOT EXISTS "categories_breadcrumbs_doc_idx" ON "categories_breadcrumbs" USING btree ("doc_id"); diff --git a/templates/with-vercel-website/src/migrations/index.ts b/templates/with-vercel-website/src/migrations/index.ts index fc0a33340e6..4bc81e28a52 100644 --- a/templates/with-vercel-website/src/migrations/index.ts +++ b/templates/with-vercel-website/src/migrations/index.ts @@ -1,9 +1,9 @@ -import * as migration_20241203_192242_initial from './20241203_192242_initial' +import * as migration_20241204_024245_initial from './20241204_024245_initial' export const migrations = [ { - up: migration_20241203_192242_initial.up, - down: migration_20241203_192242_initial.down, - name: '20241203_192242_initial', + up: migration_20241204_024245_initial.up, + down: migration_20241204_024245_initial.down, + name: '20241204_024245_initial', }, ]