up:
- BEGIN TRANSACTION;
- ALTER TABLE DataElement RENAME TO DataElement_Old;
- CREATE TABLE DataElement (_id INTEGER PRIMARY KEY AUTOINCREMENT, uid TEXT NOT NULL UNIQUE, code TEXT, name TEXT, displayName TEXT, created TEXT, lastUpdated TEXT, shortName TEXT, displayShortName TEXT, description TEXT, displayDescription TEXT, valueType TEXT, zeroIsSignificant INTEGER, aggregationType TEXT, formName TEXT, domainType TEXT, displayFormName TEXT, optionSet TEXT, categoryCombo TEXT NOT NULL, FOREIGN KEY (optionSet) REFERENCES OptionSet (uid) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, FOREIGN KEY (categoryCombo) REFERENCES CategoryCombo (uid) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED);
- INSERT INTO DataElement (_id, uid, code, name, displayName, created, lastUpdated, shortName, displayShortName, description, displayDescription, valueType, zeroIsSignificant, aggregationType, formName, domainType, displayFormName, optionSet, categoryCombo) SELECT _id, uid, code, name, displayName, created, lastUpdated, shortName, displayShortName, description, displayDescription, valueType, zeroIsSignificant, aggregationType, formName, domainType, displayFormName, optionSet, categoryCombo FROM DataElement_Old;
- DROP TABLE DataElement_Old;
- COMMIT;
Update DB to remove deprecated fields from DataElement table
[ANDROSDK-357] Update DB to remove deprecated fields from DataElement table
