correctly passed tableName while creating tempTable

This commit is contained in:
Abhinav-grd 2021-01-25 11:45:37 +05:30
parent a395e27f80
commit 3a57092c5c

View file

@ -64,10 +64,10 @@ class FilesDB {
}
// SQL code to create the database table
static List<String> createTable(String tablename) {
static List<String> createTable(String tableName) {
return [
'''
CREATE TABLE $tablename (
CREATE TABLE $tableName (
$columnGeneratedID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
$columnLocalID TEXT,
$columnUploadedFileID INTEGER,
@ -107,7 +107,7 @@ class FilesDB {
static List<String> alterDeviceFolderToAllowNULL() {
return [
...createTable(table),
...createTable(tempTable),
'''
INSERT INTO $tempTable
SELECT *