@secondlayer/shared 4.3.3 → 4.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type Kysely, sql } from "kysely";
|
|
2
|
+
|
|
3
|
+
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
|
+
await sql`
|
|
5
|
+
ALTER TABLE subscriptions
|
|
6
|
+
ALTER COLUMN account_id TYPE text
|
|
7
|
+
USING account_id::text
|
|
8
|
+
`.execute(db);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export async function down(db: Kysely<unknown>): Promise<void> {
|
|
12
|
+
await sql`
|
|
13
|
+
ALTER TABLE subscriptions
|
|
14
|
+
ALTER COLUMN account_id TYPE uuid
|
|
15
|
+
USING NULLIF(account_id, '')::uuid
|
|
16
|
+
`.execute(db);
|
|
17
|
+
}
|