From 8d611a99876183d94b6315fc02a8feebf340b5f0 Mon Sep 17 00:00:00 2001 From: exAspArk Date: Thu, 4 Jan 2024 21:45:32 -0500 Subject: [PATCH] Release v0.2.1 --- CHANGELOG.md | 4 ++++ package.json | 2 +- src/cli.ts | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6985b0e..804d215 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v0.2.1 + +- Fix migration generation to work with tables names containing double quotes. + ## v0.2.0 - Updated license from MIT to LGPL-3.0 `#LoveOpenSource` diff --git a/package.json b/package.json index 3bc1a43..052f8d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bemi-db/prisma", - "version": "0.2.0", + "version": "0.2.1", "description": "Automatic data change tracking for Prisma", "main": "dist/index.js", "module": "./dist/index.mjs", diff --git a/src/cli.ts b/src/cli.ts index 79bc4ea..c9c2369 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -32,7 +32,7 @@ BEGIN SELECT tablename FROM pg_tables WHERE schemaname = 'public' LOOP EXECUTE format( - 'CREATE OR REPLACE TRIGGER _bemi_row_trigger_%I + 'CREATE OR REPLACE TRIGGER _bemi_row_trigger_%s BEFORE INSERT OR UPDATE OR DELETE ON %I FOR EACH ROW EXECUTE FUNCTION _bemi_row_trigger_func()', current_tablename, current_tablename @@ -72,7 +72,7 @@ const generateMigrationFile = async () => { const program = new Command(); -program.name("bemi").description("CLI to Bemi utilities").version("0.1.0"); +program.name("bemi").description("CLI to Bemi utilities").version("0.2.1"); program. command("migration:create").