BEGIN;
CREATE TABLE change_table (_rowid INTEGER PRIMARY KEY, table_name char NOT NULL);
CREATE TABLE change_log (_rowid INTEGER PRIMARY KEY, _timestamp datetime, table_id longlong NOT NULL, primary_key longlong NOT NULL,operation char NOT NULL,changed_columns char, client_id char, user_id longlong);
CREATE INDEX change_log_table_id_index ON change_log (table_id);
CREATE INDEX change_log_primary_key_index ON change_log (primary_key);
INSERT INTO change_table(_rowid, table_name) VALUES (1, 'BEXIgnore');
INSERT INTO change_table(_rowid, table_name) VALUES (2, 'Category');
INSERT INTO change_table(_rowid, table_name) VALUES (3, 'Client');
INSERT INTO change_table(_rowid, table_name) VALUES (4, 'ClientABLink');
INSERT INTO change_table(_rowid, table_name) VALUES (5, 'ClientCategory');
INSERT INTO change_table(_rowid, table_name) VALUES (6, 'ClientPhoto');
INSERT INTO change_table(_rowid, table_name) VALUES (7, 'ConsolidatedTax');
INSERT INTO change_table(_rowid, table_name) VALUES (35, 'Currency');
INSERT INTO change_table(_rowid, table_name) VALUES (8, 'Estimate');
INSERT INTO change_table(_rowid, table_name) VALUES (36, 'EstimateHtml');
INSERT INTO change_table(_rowid, table_name) VALUES (9, 'EstimateSlip');
INSERT INTO change_table(_rowid, table_name) VALUES (37, 'Extra');
INSERT INTO change_table(_rowid, table_name) VALUES (10, 'ExtraFieldNames');
INSERT INTO change_table(_rowid, table_name) VALUES (11, 'Invoice');
INSERT INTO change_table(_rowid, table_name) VALUES (34, 'InvoiceHtml');
INSERT INTO change_table(_rowid, table_name) VALUES (12, 'MCUserDefaultsStorage');
INSERT INTO change_table(_rowid, table_name) VALUES (13, 'Note');
INSERT INTO change_table(_rowid, table_name) VALUES (14, 'Payment');
INSERT INTO change_table(_rowid, table_name) VALUES (15, 'PaymentInvoiceEntry');
INSERT INTO change_table(_rowid, table_name) VALUES (16, 'PaymentMethodType');
INSERT INTO change_table(_rowid, table_name) VALUES (17, 'ProFormaInvoice');
INSERT INTO change_table(_rowid, table_name) VALUES (18, 'Project');
INSERT INTO change_table(_rowid, table_name) VALUES (19, 'ProjectStage');
INSERT INTO change_table(_rowid, table_name) VALUES (20, 'ProjectState');
INSERT INTO change_table(_rowid, table_name) VALUES (21, 'RecurringInvoice');
INSERT INTO change_table(_rowid, table_name) VALUES (22, 'Retainer');
INSERT INTO change_table(_rowid, table_name) VALUES (23, 'SlipConflict');
INSERT INTO change_table(_rowid, table_name) VALUES (24, 'SlipTemplate');
INSERT INTO change_table(_rowid, table_name) VALUES (25, 'Statement');
INSERT INTO change_table(_rowid, table_name) VALUES (26, 'Tax');
INSERT INTO change_table(_rowid, table_name) VALUES (27, 'TaxConsolidatedTaxEntry');
INSERT INTO change_table(_rowid, table_name) VALUES (28, 'TimeEntry');
INSERT INTO change_table(_rowid, table_name) VALUES (29, 'TimeSlip');
INSERT INTO change_table(_rowid, table_name) VALUES (30, 'TimeSlipType');
INSERT INTO change_table(_rowid, table_name) VALUES (31, 'URLReference');
INSERT INTO change_table(_rowid, table_name) VALUES (32, 'User');
COMMIT;
