Skip to content

Commit

Permalink
fix(templates): vercel migrations (#9730)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulpopus authored Dec 4, 2024
1 parent 2ef7de5 commit 32f0f34
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,13 @@ export async function up({ payload, req }: MigrateUpArgs): Promise<void> {
"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" (
Expand Down Expand Up @@ -1356,6 +1362,7 @@ export async function up({ payload, req }: MigrateUpArgs): Promise<void> {
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");
Expand Down
8 changes: 4 additions & 4 deletions templates/with-vercel-website/src/migrations/index.ts
Original file line number Diff line number Diff line change
@@ -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',
},
]

0 comments on commit 32f0f34

Please sign in to comment.