add: stand configs

This commit is contained in:
“Naeel”
2026-06-30 15:46:24 +04:00
parent ca276d200f
commit 1a52506fb1
91 changed files with 10766 additions and 0 deletions
@@ -0,0 +1,20 @@
import {Loopback4ExampleGithubApplication} from './application';
export async function migrate(args: string[]) {
const existingSchema = args.includes('--rebuild') ? 'drop' : 'alter';
console.log('Migrating schemas (%s existing schema)', existingSchema);
const app = new Loopback4ExampleGithubApplication();
await app.boot();
await app.migrateSchema({existingSchema});
// Connectors usually keep a pool of opened connections,
// this keeps the process running even after all work is done.
// We need to exit explicitly.
process.exit(0);
}
migrate(process.argv).catch(err => {
console.error('Cannot migrate database schema', err);
process.exit(1);
});