~georgeyk/stoqlib/ideale-henrique

« back to all changes in this revision

Viewing changes to data/sql/patch-00-53.sql

  • Committer: george
  • Date: 2009-08-04 13:57:51 UTC
  • Revision ID: george@memento-20090804135751-95aw4wd8somwjpvf
ideale changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
-- #3795: Redesign Payment methods
2
2
 
3
3
-- Financial details is gone
4
 
DROP TABLE finance_p_m;
5
 
DROP TABLE finance_details;
 
4
-- DROP TABLE finance_p_m;
 
5
-- DROP TABLE finance_details;
6
6
-- We can't remove it because there might be payments referecing it, so
7
7
-- just disable it instead.
8
 
UPDATE apayment_method SET is_active = FALSE WHERE child_name = 'FinancePM';
 
8
-- UPDATE apayment_method SET is_active = FALSE WHERE child_name = 'FinancePM';
9
9
 
10
10
-- PaymentMethod: Add new columns
11
 
ALTER TABLE apayment_method ADD COLUMN te_created_id bigint REFERENCES transaction_entry(id);
 
11
-- ALTER TABLE apayment_method ADD COLUMN te_created_id bigint REFERENCES transaction_entry(id);
12
12
ALTER TABLE apayment_method ADD COLUMN te_modified_id bigint REFERENCES transaction_entry(id);
13
13
ALTER TABLE apayment_method ADD COLUMN method_name text UNIQUE;
14
14
ALTER TABLE apayment_method ADD COLUMN description text;
69
69
DROP TABLE gift_certificate_p_m;
70
70
DROP TABLE money_p_m;
71
71
DROP TABLE payment_method;
 
72
-- DROP SEQUENCE payment_method_id_seq;
72
73
 
73
74
ALTER TABLE apayment_method RENAME TO payment_method;
74
75
ALTER TABLE apayment_method_id_seq RENAME TO payment_method_id_seq;