mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-16 23:41:11 +02:00
Clean up migrations
This commit is contained in:
parent
4d7e25f97b
commit
d732c1a845
2 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
import { db } from "@server/db/pg/driver";
|
import { db } from "@server/db/pg/driver";
|
||||||
import { sql } from "drizzle-orm";
|
import { sql } from "drizzle-orm";
|
||||||
|
|
||||||
const version = "1.7.0";
|
const version = "1.8.0";
|
||||||
|
|
||||||
export default async function migration() {
|
export default async function migration() {
|
||||||
console.log(`Running setup script ${version}...`);
|
console.log(`Running setup script ${version}...`);
|
||||||
|
|
|
@ -5,7 +5,7 @@ import path from "path";
|
||||||
const version = "1.8.0";
|
const version = "1.8.0";
|
||||||
|
|
||||||
export default async function migration() {
|
export default async function migration() {
|
||||||
console.log("Running setup script ${version}...");
|
console.log(`Running setup script ${version}...`);
|
||||||
|
|
||||||
const location = path.join(APP_PATH, "db", "db.sqlite");
|
const location = path.join(APP_PATH, "db", "db.sqlite");
|
||||||
const db = new Database(location);
|
const db = new Database(location);
|
||||||
|
@ -13,7 +13,7 @@ export default async function migration() {
|
||||||
try {
|
try {
|
||||||
db.transaction(() => {
|
db.transaction(() => {
|
||||||
db.exec(`
|
db.exec(`
|
||||||
ALTER TABLE 'resources' ADD 'enableProxy' integer DEFAULT true;
|
ALTER TABLE 'resources' ADD 'enableProxy' integer DEFAULT 1;
|
||||||
ALTER TABLE 'sites' ADD 'remoteSubnets' text;
|
ALTER TABLE 'sites' ADD 'remoteSubnets' text;
|
||||||
ALTER TABLE 'user' ADD 'termsAcceptedTimestamp' text;
|
ALTER TABLE 'user' ADD 'termsAcceptedTimestamp' text;
|
||||||
ALTER TABLE 'user' ADD 'termsVersion' text;
|
ALTER TABLE 'user' ADD 'termsVersion' text;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue