build_app
This commit is contained in:
@@ -2,17 +2,61 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import 'package:sqflite/sqflite.dart';
|
||||
|
||||
class TableQuery {
|
||||
Future<void> createOtherTable(Database db) async {
|
||||
// Table Query
|
||||
|
||||
_createHello(db, 'Hello');
|
||||
|
||||
// OLD: _createGauravt2(db, 'Gauravt2'); // demo table from old template - disabled for clean base - by Azmat
|
||||
// OLD: _createGauravtest1(db, 'Gauravtest1'); // demo table from old template - disabled for clean base - by Azmat
|
||||
}
|
||||
|
||||
// Table Query Data
|
||||
|
||||
Future<void> _createHello(Database db, String tableName) async {
|
||||
var tableExists = await _isTableExists(db, tableName);
|
||||
if (!tableExists) {
|
||||
print('$tableName making.....');
|
||||
await db.execute(
|
||||
'''
|
||||
CREATE TABLE $tableName (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
accountId TEXT,
|
||||
createdAt TEXT,
|
||||
createdBy TEXT,
|
||||
updatedAt TEXT,
|
||||
updatedBy TEXT,
|
||||
extn1 TEXT,
|
||||
extn2 TEXT,
|
||||
extn3 TEXT,
|
||||
extn4 TEXT,
|
||||
extn5 TEXT,
|
||||
extn6 TEXT,
|
||||
extn7 TEXT,
|
||||
extn8 TEXT,
|
||||
extn9 TEXT,
|
||||
extn10 TEXT,
|
||||
extn11 TEXT,
|
||||
extn12 TEXT,
|
||||
extn13 TEXT,
|
||||
extn14 TEXT,
|
||||
extn15 TEXT,
|
||||
Active INTEGER,
|
||||
Description TEXT,
|
||||
Name TEXT,
|
||||
|
||||
)''');
|
||||
} else {
|
||||
print('$tableName table exist');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Future<void> _createGauravt2(Database db, String tableName) async {
|
||||
var tableExists = await _isTableExists(db, tableName);
|
||||
if (!tableExists) {
|
||||
|
||||
Reference in New Issue
Block a user