corrected the formatting issue
This commit is contained in:
parent
5ad792590d
commit
e141e39dee
3 changed files with 39 additions and 35 deletions
|
@ -53,19 +53,19 @@ class CollectionsDB {
|
|||
static List<String> onCreate(String tableName) {
|
||||
return [
|
||||
'''
|
||||
CREATE TABLE $tableName (
|
||||
$columnID INTEGER PRIMARY KEY NOT NULL,
|
||||
$columnOwner TEXT NOT NULL,
|
||||
$columnEncryptedKey TEXT NOT NULL,
|
||||
$columnKeyDecryptionNonce TEXT,
|
||||
$columnName TEXT,
|
||||
$columnType TEXT NOT NULL,
|
||||
$columnEncryptedPath TEXT,
|
||||
$columnPathDecryptionNonce TEXT,
|
||||
$columnSharees TEXT,
|
||||
$columnUpdationTime TEXT NOT NULL
|
||||
);
|
||||
'''
|
||||
CREATE TABLE $tableName (
|
||||
$columnID INTEGER PRIMARY KEY NOT NULL,
|
||||
$columnOwner TEXT NOT NULL,
|
||||
$columnEncryptedKey TEXT NOT NULL,
|
||||
$columnKeyDecryptionNonce TEXT,
|
||||
$columnName TEXT,
|
||||
$columnType TEXT NOT NULL,
|
||||
$columnEncryptedPath TEXT,
|
||||
$columnPathDecryptionNonce TEXT,
|
||||
$columnSharees TEXT,
|
||||
$columnUpdationTime TEXT NOT NULL
|
||||
);
|
||||
'''
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -73,16 +73,16 @@ class CollectionsDB {
|
|||
return [
|
||||
...onCreate(collectionsTableCopy),
|
||||
'''
|
||||
INSERT INTO $collectionsTableCopy
|
||||
SELECT *
|
||||
FROM $collectionsTable;
|
||||
INSERT INTO $collectionsTableCopy
|
||||
SELECT *
|
||||
FROM $collectionsTable;
|
||||
''',
|
||||
'''
|
||||
DROP TABLE $collectionsTable;
|
||||
DROP TABLE $collectionsTable;
|
||||
''',
|
||||
'''
|
||||
ALTER TABLE $collectionsTableCopy
|
||||
RENAME TO $collectionsTable;
|
||||
ALTER TABLE $collectionsTableCopy
|
||||
RENAME TO $collectionsTable;
|
||||
'''
|
||||
];
|
||||
}
|
||||
|
@ -90,12 +90,12 @@ class CollectionsDB {
|
|||
static List<String> addEncryptedName() {
|
||||
return [
|
||||
'''
|
||||
ALTER TABLE $collectionsTable
|
||||
ADD COLUMN $columnEncryptedName TEXT;
|
||||
ALTER TABLE $collectionsTable
|
||||
ADD COLUMN $columnEncryptedName TEXT;
|
||||
''',
|
||||
'''ALTER TABLE $collectionsTable
|
||||
ADD COLUMN $columnNameDecryptionNonce TEXT;
|
||||
'''
|
||||
ADD COLUMN $columnNameDecryptionNonce TEXT;
|
||||
'''
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -104,15 +104,15 @@ class FilesDB {
|
|||
...onCreate(tableCopy),
|
||||
'''
|
||||
INSERT INTO $tableCopy
|
||||
SELECT *
|
||||
FROM $table;
|
||||
SELECT *
|
||||
FROM $table;
|
||||
''',
|
||||
'''
|
||||
DROP TABLE $table;
|
||||
DROP TABLE $table;
|
||||
''',
|
||||
'''
|
||||
ALTER TABLE $tableCopy
|
||||
RENAME TO $table;
|
||||
ALTER TABLE $tableCopy
|
||||
RENAME TO $table;
|
||||
'''
|
||||
];
|
||||
}
|
||||
|
|
18
pubspec.yaml
18
pubspec.yaml
|
@ -91,26 +91,30 @@ flutter:
|
|||
assets:
|
||||
- assets/
|
||||
fonts:
|
||||
- family: NunitoSans
|
||||
fonts:
|
||||
- asset: fonts/NunitoSans-Regular.ttf
|
||||
- asset: fonts/NunitoSans-Bold.ttf
|
||||
- family: Montserrat
|
||||
fonts:
|
||||
- asset: fonts/Montserrat-Medium.ttf
|
||||
- family: NunitoSans
|
||||
fonts:
|
||||
- asset: fonts/NunitoSans-Regular.ttf
|
||||
- asset: fonts/NunitoSans-Bold.ttf
|
||||
- family: Montserrat
|
||||
fonts:
|
||||
- asset: fonts/Montserrat-Medium.ttf
|
||||
|
||||
# The following line ensures that the Material Icons font is
|
||||
# included with your application, so that you can use the icons in
|
||||
# the material Icons class.
|
||||
uses-material-design: true
|
||||
|
||||
# To add assets to your application, add an assets section, like this:
|
||||
# assets:
|
||||
# - images/a_dot_burr.jpeg
|
||||
# - images/a_dot_ham.jpeg
|
||||
|
||||
# An image asset can refer to one or more resolution-specific "variants", see
|
||||
# https://flutter.dev/assets-and-images/#resolution-aware.
|
||||
|
||||
# For details regarding adding assets from package dependencies, see
|
||||
# https://flutter.dev/assets-and-images/#from-packages
|
||||
|
||||
# To add custom fonts to your application, add a fonts section here,
|
||||
# in this "flutter" section. Each entry in this list should have a
|
||||
# "family" key with the font family name, and a "fonts" key with a
|
||||
|
|
Loading…
Add table
Reference in a new issue