Move all old db patch files to db/old_migrations/

This commit is contained in:
Louis Lam 2023-07-01 20:54:47 +08:00
parent e26abc3156
commit ccc39b9516
47 changed files with 7 additions and 3 deletions

View file

@ -0,0 +1,3 @@
# Don't create a new migration file here
Please go to ./db/knex_migrations/README.md

View file

@ -7,6 +7,7 @@ services:
volumes: volumes:
#- ./data:/app/data #- ./data:/app/data
- ../server:/app/server - ../server:/app/server
- ../db:/app/db
ports: ports:
- "3001:3001" # <Host Port>:<Container Port> - "3001:3001" # <Host Port>:<Container Port>
- "3307:3306" - "3307:3306"

View file

@ -356,7 +356,7 @@ class Database {
// Try catch anything here // Try catch anything here
try { try {
for (let i = version + 1; i <= this.latestVersion; i++) { for (let i = version + 1; i <= this.latestVersion; i++) {
const sqlFile = `./db/patch${i}.sql`; const sqlFile = `./db/old_migrations/patch${i}.sql`;
log.info("db", `Patching ${sqlFile}`); log.info("db", `Patching ${sqlFile}`);
await Database.importSQLFile(sqlFile); await Database.importSQLFile(sqlFile);
log.info("db", `Patched ${sqlFile}`); log.info("db", `Patched ${sqlFile}`);
@ -515,7 +515,7 @@ class Database {
log.info("db", sqlFilename + " is patching"); log.info("db", sqlFilename + " is patching");
this.patched = true; this.patched = true;
await this.importSQLFile("./db/" + sqlFilename); await this.importSQLFile("./db/old_migrations/" + sqlFilename);
databasePatchedFiles[sqlFilename] = true; databasePatchedFiles[sqlFilename] = true;
log.info("db", sqlFilename + " was patched successfully"); log.info("db", sqlFilename + " was patched successfully");

View file

@ -3,7 +3,7 @@
"setupDatabaseChooseDatabase": "Which database do you want to use?", "setupDatabaseChooseDatabase": "Which database do you want to use?",
"setupDatabaseEmbeddedMariaDB": "You don't need to set anything. This docker image have embedded and configured a MariaDB for you automatically. Uptime Kuma will connect to this database via unix socket.", "setupDatabaseEmbeddedMariaDB": "You don't need to set anything. This docker image have embedded and configured a MariaDB for you automatically. Uptime Kuma will connect to this database via unix socket.",
"setupDatabaseMariaDB": "Connect to an external MariaDB database. You need to set the database connection information.", "setupDatabaseMariaDB": "Connect to an external MariaDB database. You need to set the database connection information.",
"setupDatabaseSQLite": "A simple database file. It is recommended for small scale deployment. Before 2.0.0, Uptime Kuma used SQLite by default.", "setupDatabaseSQLite": "A simple database file, recommended for small-scale deployments. Prior to v2.0.0, Uptime Kuma used SQLite as the default database.",
"dbName": "Database Name", "dbName": "Database Name",
"Settings": "Settings", "Settings": "Settings",
"Dashboard": "Dashboard", "Dashboard": "Dashboard",