Back to project page baracus-framework.
The source code is released under:
Apache License
If you think the Android project baracus-framework listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package net.mantucon.baracus.migr8; //from w w w .j av a2s . c o m import android.database.sqlite.SQLiteDatabase; import net.mantucon.baracus.model.ConfigurationParameter; import net.mantucon.baracus.util.Logger; /** * Initial Model creating the configuration table to be used by the configuration DAO. * <p/> * This table enables you to store key-value-pairs into your database. */ public class ModelVersion000 implements MigrationStep { private static final Logger logger = new Logger(ModelVersion000.class); @Override public void applyVersion(SQLiteDatabase db) { String stmt = "CREATE TABLE " + ConfigurationParameter.TABLE_CONFIGURATION + "( " + ConfigurationParameter.idCol.fieldName + " INTEGER PRIMARY KEY" + ", " + ConfigurationParameter.configParamCol.fieldName + " TEXT" + ", " + ConfigurationParameter.configParamValueCol.fieldName + " TEXT)"; logger.info(stmt); db.execSQL(stmt); } @Override public int getModelVersionNumber() { return 0; } }