Ticket #1484668 (closed Bugs: fixed)

Opened 13 months ago

Last modified 12 months ago

Postgresql upgrade script syntax isn't valid for ALTER TABLE

Reported by: matt Owned by:
Priority: 4 Milestone: 0.1-stable
Component: Database Version: 0.1-rc2
Severity: normal Keywords:
Cc:

Description

The update script in 1.0rc2 has: ALTER TABLE "identities" ADD html_signature integer DEFAULT 0 NOT NULL;

except that syntax isn't valid (at least for 7.4 that I'm using). Something better might be:

ALTER TABLE "identities" ADD html_signature; ALTER TABLE "identities" ALTER html_signature SET DEFAULT 0; UPDATE identities SET html_signature = 0; ALTER TABLE "identities" ALTER html_signature SET NOT NULL;

(the required UPDATE is a bit ugly, not sure a better way).

Change History

Changed 13 months ago by matt

Again for formatting:

ALTER TABLE "identities" ADD html_signature;
ALTER TABLE "identities" ALTER html_signature SET DEFAULT 0;
UPDATE identities SET html_signature = 0;
ALTER TABLE "identities" ALTER html_signature SET NOT NULL;

Changed 13 months ago by thomasb

  • milestone set to 0.1-stable

Changed 12 months ago by thomasb

  • status changed from new to closed
  • resolution set to fixed

Fixed in r923

Note: See TracTickets for help on using tickets.