Skip to content

Commit

Permalink
templates: bump templates for v3.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 11, 2024
1 parent e78b542 commit 81279d3
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "3a7129dd-a5a9-4fff-97c9-e02c3cf1e365",
"id": "f64eb78b-eee1-4f0a-b16e-0678c981d038",
"prevId": "00000000-0000-0000-0000-000000000000",
"version": "7",
"dialect": "postgresql",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres'

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

export async function down({ payload, req }: MigrateDownArgs): Promise<void> {
await payload.db.drizzle.execute(sql`
export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
await db.execute(sql`
DROP TABLE "users" CASCADE;
DROP TABLE "media" CASCADE;
DROP TABLE "payload_locked_documents" CASCADE;
Expand Down
8 changes: 4 additions & 4 deletions templates/with-postgres/src/migrations/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as migration_20241210_000627_initial from './20241210_000627_initial'
import * as migration_20241211_181852_initial from './20241211_181852_initial'

export const migrations = [
{
up: migration_20241210_000627_initial.up,
down: migration_20241210_000627_initial.down,
name: '20241210_000627_initial',
up: migration_20241211_181852_initial.up,
down: migration_20241211_181852_initial.down,
name: '20241211_181852_initial',
},
]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "559763df-0cb1-4831-b61e-7176a2b4f9d5",
"id": "caa6bd33-8ffb-423d-a29d-c6f36780fb0c",
"prevId": "00000000-0000-0000-0000-000000000000",
"version": "7",
"dialect": "postgresql",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-vercel-postgres'

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

export async function down({ payload, req }: MigrateDownArgs): Promise<void> {
await payload.db.drizzle.execute(sql`
export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
await db.execute(sql`
DROP TABLE "users" CASCADE;
DROP TABLE "media" CASCADE;
DROP TABLE "payload_locked_documents" CASCADE;
Expand Down
8 changes: 4 additions & 4 deletions templates/with-vercel-postgres/src/migrations/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as migration_20241210_000603_initial from './20241210_000603_initial'
import * as migration_20241211_181826_initial from './20241211_181826_initial'

export const migrations = [
{
up: migration_20241210_000603_initial.up,
down: migration_20241210_000603_initial.down,
name: '20241210_000603_initial',
up: migration_20241211_181826_initial.up,
down: migration_20241211_181826_initial.down,
name: '20241211_181826_initial',
},
]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "37ea3c82-a0e9-4bfa-9693-f24bdd61e87c",
"id": "fc9ae914-9413-4fca-a0a1-48eddce34984",
"prevId": "00000000-0000-0000-0000-000000000000",
"version": "7",
"dialect": "postgresql",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-vercel-postgres'

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

export async function down({ payload, req }: MigrateDownArgs): Promise<void> {
await payload.db.drizzle.execute(sql`
export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
await db.execute(sql`
DROP TABLE "pages_hero_links" CASCADE;
DROP TABLE "pages_blocks_cta_links" CASCADE;
DROP TABLE "pages_blocks_cta" CASCADE;
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_20241210_000617_initial from './20241210_000617_initial'
import * as migration_20241211_181841_initial from './20241211_181841_initial'

export const migrations = [
{
up: migration_20241210_000617_initial.up,
down: migration_20241210_000617_initial.down,
name: '20241210_000617_initial',
up: migration_20241211_181841_initial.up,
down: migration_20241211_181841_initial.down,
name: '20241211_181841_initial',
},
]

0 comments on commit 81279d3

Please sign in to comment.