Created
January 2, 2018 11:49
-
-
Save alfianyusufabdullah/6a376207618bf6deec72514fa1b2c1c8 to your computer and use it in GitHub Desktop.
app 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by jonesrandom on 12/31/17. | |
* | |
* @site www.androidexample.web.id | |
* @github @alfianyusufabdullah | |
*/ | |
public class App extends Application { | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
TableConfiguration tabelMahasiswa = new TableConfiguration(DatabaseConfig.TABEL_NAME); | |
tabelMahasiswa.addColumn(DatabaseConfig.COL_ID, TableConfiguration.TYPE_INTEGER, "PRIMARY KEY AUTOINCREMENT"); | |
tabelMahasiswa.addColumn(DatabaseConfig.COL_NAMA_MAHASISWA, TableConfiguration.TYPE_VARCHAR); | |
tabelMahasiswa.addColumn(DatabaseConfig.COL_NIM_MAHASISWA, TableConfiguration.TYPE_VARCHAR); | |
tabelMahasiswa.addColumn(DatabaseConfig.COL_SEMESTER_MAHASISWA, TableConfiguration.TYPE_VARCHAR); | |
TableConfiguration tabelBaru = ... | |
EZQLiteDatabaseConfiguration.getInstance() | |
.setDatabaseName(DatabaseConfig.DATABASE_NAME) | |
.setDatabaseVersion(DatabaseConfig.DATABASE_VERSION) | |
.addTableConfiguration(tabelMahasiswa) | |
.addTableConfiguration(tabelBaru) | |
.build(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment