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
|
@ -57,19 +57,14 @@ CREATE TABLE IF NOT EXISTS "items" (
|
|||
);
|
||||
`)
|
||||
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)
|
||||
ON CONFLICT DO NOTHING`, p.channel)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue
Block a user