Update .gitignore, add dist directory
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
import { AppData } from "../../data/app-data";
|
||||
import MariaDBQuoteGen from "./mariadb-quote-gen";
|
||||
import runSchemaQuery from "./run-schema-query";
|
||||
export default async function upsertDbManagerTable({ tableName, config, }) {
|
||||
const now = Date.now();
|
||||
await runSchemaQuery({
|
||||
query: `INSERT INTO ${MariaDBQuoteGen(AppData["DbSchemaManagerTableName"])} (table_name, created_at, updated_at) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE updated_at = VALUES(updated_at)`,
|
||||
values: [tableName, now, now],
|
||||
config,
|
||||
});
|
||||
}
|
||||
export async function removeDbManagerTable({ tableName, config, }) {
|
||||
await runSchemaQuery({
|
||||
query: `DELETE FROM ${MariaDBQuoteGen(AppData["DbSchemaManagerTableName"])} WHERE table_name = ?`,
|
||||
values: [tableName],
|
||||
config,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user