exec($schema); echo "Migration successful."; } catch(Exception $e) { // If columns already exist, sqlite throws exception. We can ignore it safely for alter table if rerun. echo "Migration finished (or already applied)."; }