summaryrefslogtreecommitdiff
path: root/sql/Pg-upgrade-2.6.12-2.6.17.sql
blob: 908ad1980841642a7dce8708e9aa0599e7a0fb0e (plain)
  1. CREATE SEQUENCE session_session_id_seq;
  2. CREATE TABLE session(
  3. session_id INTEGER PRIMARY KEY DEFAULT nextval('session_session_id_seq'),
  4. sl_login VARCHAR(50),
  5. token CHAR(32),
  6. last_used TIMESTAMP default now()
  7. );
  8. -- LOCK TABLE acc_trans;
  9. ALTER TABLE acc_trans ALTER COLUMN chart_id SET NOT NULL;
  10. -- For older versions pre 8.0.3
  11. ALTER TABLE acc_trans ADD COLUMN amount2 NUMERIC;
  12. UPDATE acc_trans set amount2 = amount;
  13. ALTER TABLE acc_trans DROP COLUMN amount;
  14. ALTER TABLE acc_trans RENAME column amount2 TO amount;
  15. UPDATE defaults SET version = '2.6.17';