Fix alteration of items table
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
43472a64e7
commit
44ec376bda
|
@ -55,19 +55,14 @@ CREATE TABLE IF NOT EXISTS "items" (
|
|||
"updated_at" timestamp,
|
||||
"published_at" timestamp
|
||||
);
|
||||
`)
|
||||
if err != nil {
|
||||
|
||||
_, err = conn.ExecContext(ctx, `
|
||||
ALTER TABLE "items"
|
||||
ALTER COLUMN "data" TYPE jsonb
|
||||
ALTER COLUMN "uid" TYPE varchar(1024);
|
||||
);
|
||||
`)
|
||||
if err != nil {
|
||||
return fmt.Errorf("create items table failed: %w", err)
|
||||
}
|
||||
return fmt.Errorf("create items table failed: %w", err)
|
||||
|
||||
_, err = conn.ExecContext(ctx, `ALTER TABLE "items" ALTER COLUMN "data" TYPE jsonb, ALTER COLUMN "uid" TYPE varchar(1024)`)
|
||||
if err != nil {
|
||||
return fmt.Errorf("alter items table failed: %w", err)
|
||||
}
|
||||
|
||||
_, err = conn.ExecContext(ctx, `INSERT INTO "channels" ("name", "created_at") VALUES ($1, DEFAULT)
|
||||
|
|
Loading…
Reference in New Issue
Block a user