Skip to content

Commit 5c2f72d

Browse files
templates: bump for v3.6.0 (#9900)
🤖 Automated bump of templates for v3.6.0 Triggered by user: @denolfe Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent e78b542 commit 5c2f72d

File tree

9 files changed

+27
-27
lines changed

9 files changed

+27
-27
lines changed

templates/with-postgres/src/migrations/20241210_000627_initial.json renamed to templates/with-postgres/src/migrations/20241211_181852_initial.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"id": "3a7129dd-a5a9-4fff-97c9-e02c3cf1e365",
2+
"id": "f64eb78b-eee1-4f0a-b16e-0678c981d038",
33
"prevId": "00000000-0000-0000-0000-000000000000",
44
"version": "7",
55
"dialect": "postgresql",

templates/with-postgres/src/migrations/20241210_000627_initial.ts renamed to templates/with-postgres/src/migrations/20241211_181852_initial.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres'
22

3-
export async function up({ payload, req }: MigrateUpArgs): Promise<void> {
4-
await payload.db.drizzle.execute(sql`
3+
export async function up({ db, payload, req }: MigrateUpArgs): Promise<void> {
4+
await db.execute(sql`
55
CREATE TABLE IF NOT EXISTS "users" (
66
"id" serial PRIMARY KEY NOT NULL,
77
"updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL,
@@ -126,8 +126,8 @@ export async function up({ payload, req }: MigrateUpArgs): Promise<void> {
126126
CREATE INDEX IF NOT EXISTS "payload_migrations_created_at_idx" ON "payload_migrations" USING btree ("created_at");`)
127127
}
128128

129-
export async function down({ payload, req }: MigrateDownArgs): Promise<void> {
130-
await payload.db.drizzle.execute(sql`
129+
export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
130+
await db.execute(sql`
131131
DROP TABLE "users" CASCADE;
132132
DROP TABLE "media" CASCADE;
133133
DROP TABLE "payload_locked_documents" CASCADE;
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import * as migration_20241210_000627_initial from './20241210_000627_initial'
1+
import * as migration_20241211_181852_initial from './20241211_181852_initial'
22

33
export const migrations = [
44
{
5-
up: migration_20241210_000627_initial.up,
6-
down: migration_20241210_000627_initial.down,
7-
name: '20241210_000627_initial',
5+
up: migration_20241211_181852_initial.up,
6+
down: migration_20241211_181852_initial.down,
7+
name: '20241211_181852_initial',
88
},
99
]

templates/with-vercel-postgres/src/migrations/20241210_000603_initial.json renamed to templates/with-vercel-postgres/src/migrations/20241211_181826_initial.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"id": "559763df-0cb1-4831-b61e-7176a2b4f9d5",
2+
"id": "caa6bd33-8ffb-423d-a29d-c6f36780fb0c",
33
"prevId": "00000000-0000-0000-0000-000000000000",
44
"version": "7",
55
"dialect": "postgresql",

templates/with-vercel-postgres/src/migrations/20241210_000603_initial.ts renamed to templates/with-vercel-postgres/src/migrations/20241211_181826_initial.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-vercel-postgres'
22

3-
export async function up({ payload, req }: MigrateUpArgs): Promise<void> {
4-
await payload.db.drizzle.execute(sql`
3+
export async function up({ db, payload, req }: MigrateUpArgs): Promise<void> {
4+
await db.execute(sql`
55
CREATE TABLE IF NOT EXISTS "users" (
66
"id" serial PRIMARY KEY NOT NULL,
77
"updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL,
@@ -126,8 +126,8 @@ export async function up({ payload, req }: MigrateUpArgs): Promise<void> {
126126
CREATE INDEX IF NOT EXISTS "payload_migrations_created_at_idx" ON "payload_migrations" USING btree ("created_at");`)
127127
}
128128

129-
export async function down({ payload, req }: MigrateDownArgs): Promise<void> {
130-
await payload.db.drizzle.execute(sql`
129+
export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
130+
await db.execute(sql`
131131
DROP TABLE "users" CASCADE;
132132
DROP TABLE "media" CASCADE;
133133
DROP TABLE "payload_locked_documents" CASCADE;
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import * as migration_20241210_000603_initial from './20241210_000603_initial'
1+
import * as migration_20241211_181826_initial from './20241211_181826_initial'
22

33
export const migrations = [
44
{
5-
up: migration_20241210_000603_initial.up,
6-
down: migration_20241210_000603_initial.down,
7-
name: '20241210_000603_initial',
5+
up: migration_20241211_181826_initial.up,
6+
down: migration_20241211_181826_initial.down,
7+
name: '20241211_181826_initial',
88
},
99
]

templates/with-vercel-website/src/migrations/20241210_000617_initial.json renamed to templates/with-vercel-website/src/migrations/20241211_181841_initial.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"id": "37ea3c82-a0e9-4bfa-9693-f24bdd61e87c",
2+
"id": "fc9ae914-9413-4fca-a0a1-48eddce34984",
33
"prevId": "00000000-0000-0000-0000-000000000000",
44
"version": "7",
55
"dialect": "postgresql",

templates/with-vercel-website/src/migrations/20241210_000617_initial.ts renamed to templates/with-vercel-website/src/migrations/20241211_181841_initial.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-vercel-postgres'
22

3-
export async function up({ payload, req }: MigrateUpArgs): Promise<void> {
4-
await payload.db.drizzle.execute(sql`
3+
export async function up({ db, payload, req }: MigrateUpArgs): Promise<void> {
4+
await db.execute(sql`
55
CREATE TYPE "public"."enum_pages_hero_type" AS ENUM('none', 'highImpact', 'mediumImpact', 'lowImpact');
66
CREATE TYPE "public"."enum_pages_hero_links_link_type" AS ENUM('reference', 'custom');
77
CREATE TYPE "public"."enum_pages_hero_links_link_appearance" AS ENUM('default', 'outline');
@@ -1466,8 +1466,8 @@ export async function up({ payload, req }: MigrateUpArgs): Promise<void> {
14661466
CREATE INDEX IF NOT EXISTS "footer_rels_pages_id_idx" ON "footer_rels" USING btree ("pages_id");`)
14671467
}
14681468

1469-
export async function down({ payload, req }: MigrateDownArgs): Promise<void> {
1470-
await payload.db.drizzle.execute(sql`
1469+
export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
1470+
await db.execute(sql`
14711471
DROP TABLE "pages_hero_links" CASCADE;
14721472
DROP TABLE "pages_blocks_cta_links" CASCADE;
14731473
DROP TABLE "pages_blocks_cta" CASCADE;
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import * as migration_20241210_000617_initial from './20241210_000617_initial'
1+
import * as migration_20241211_181841_initial from './20241211_181841_initial'
22

33
export const migrations = [
44
{
5-
up: migration_20241210_000617_initial.up,
6-
down: migration_20241210_000617_initial.down,
7-
name: '20241210_000617_initial',
5+
up: migration_20241211_181841_initial.up,
6+
down: migration_20241211_181841_initial.down,
7+
name: '20241211_181841_initial',
88
},
99
]

0 commit comments

Comments
 (0)