Importált rétegek stílusának szerkesztése
This commit is contained in:
@@ -38,7 +38,7 @@ class AppDatabase {
|
||||
final path = p.join(dbDir.path, 'terepi_seged.db');
|
||||
|
||||
return openDatabase(path,
|
||||
version: 1,
|
||||
version: 2,
|
||||
onConfigure: (db) => db.execute('PRAGMA foreign_keys = ON'),
|
||||
onCreate: _onCreate,
|
||||
onUpgrade: _onUpgrade);
|
||||
@@ -202,6 +202,9 @@ class AppDatabase {
|
||||
source_type TEXT NOT NULL,
|
||||
local_path TEXT NOT NULL,
|
||||
storage_path TEXT,
|
||||
color_hex TEXT,
|
||||
opacity REAL,
|
||||
stroke_width REAL,
|
||||
is_visible INTEGER NOT NULL DEFAULT 1,
|
||||
project_id INTEGER,
|
||||
imported_at TEXT NOT NULL,
|
||||
@@ -224,7 +227,19 @@ class AppDatabase {
|
||||
});
|
||||
}
|
||||
|
||||
Future<void> _onUpgrade(Database db, int oldVersion, int newVersion) async {}
|
||||
Future<void> _onUpgrade(Database db, int oldVersion, int newVersion) async {
|
||||
if (oldVersion < 2) {
|
||||
await db.execute('''
|
||||
ALTER TABLE imported_layers ADD COLUMN color_hex TEXT;
|
||||
''');
|
||||
await db.execute('''
|
||||
ALTER TABLE imported_layers ADD COLUMN opacity REAL;
|
||||
''');
|
||||
await db.execute('''
|
||||
ALTER TABLE imported_layers ADD COLUMN stroke_width REAL;
|
||||
''');
|
||||
}
|
||||
}
|
||||
|
||||
// ── Projects CRUD ─────────────────────────────────────────────────
|
||||
|
||||
|
||||
Reference in New Issue
Block a user