up:
- ALTER TABLE DataSet ADD COLUMN workflow TEXT;
- CREATE TABLE DataApproval (_id INTEGER PRIMARY KEY AUTOINCREMENT, attributeOptionCombo TEXT NOT NULL, period TEXT NOT NULL, organisationUnit TEXT NOT NULL, state TEXT NOT NULL, workflow TEXT NOT NULL, FOREIGN KEY (attributeOptionCombo) REFERENCES CategoryOptionCombo (uid) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, FOREIGN KEY (period) REFERENCES Period (periodId), FOREIGN KEY (organisationUnit) REFERENCES OrganisationUnit (uid) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, UNIQUE (attributeOptionCombo, period, organisationUnit, workflow));
up:
- ALTER TABLE DataSet ADD COLUMN workflow TEXT;
- CREATE TABLE DataApproval (_id INTEGER PRIMARY KEY AUTOINCREMENT, workflow TEXT NOT NULL, organisationUnit TEXT NOT NULL, period TEXT NOT NULL, attributeOptionCombo TEXT NOT NULL, state TEXT, FOREIGN KEY (attributeOptionCombo) REFERENCES CategoryOptionCombo (uid) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, FOREIGN KEY (period) REFERENCES Period (periodId), FOREIGN KEY (organisationUnit) REFERENCES OrganisationUnit (uid) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, UNIQUE (attributeOptionCombo, period, organisationUnit, workflow));
Add DataApproval table to DB
[ANDROSDK-28] Add DataApproval table to DB
