diff --git a/lib/globals.gd b/lib/globals.gd index cfdecb45..171896ed 100644 --- a/lib/globals.gd +++ b/lib/globals.gd @@ -16,7 +16,11 @@ func _ready() -> void: context.setup() context.open_db("user://overlay.db") - context.ensure_tables() + # Method one, just create all tables, prevents alterations to existing tables. + #context.ensure_tables() + # Method two, use migrations to handle setting up database tables, ensuring that + # tables can be modified in the future + context.run_migrations() if FileAccess.file_exists("user://settings.tres"): settings = load("user://settings.tres") else: