Releases: IzumiSy/kyrage
@izumisy/kyrage@1.5.8
Patch Changes
-
#197
26695c5Thanks @dependabot! - Updated better-sqlite3 (^12.4.1 -> ^12.6.2) -
#198
1371d2bThanks @dependabot! - Updated sql-formatter (^15.6.12 -> ^15.7.0)
@izumisy/kyrage@1.5.7
Patch Changes
-
#190
af17197Thanks @dependabot! - Updated kysely (^0.28.8 -> ^0.28.9) -
#193
d5dfe5eThanks @dependabot! - Updated sql-formatter (^15.6.10 -> ^15.6.12)
@izumisy/kyrage@1.5.6
Patch Changes
-
#183
752db7cThanks @dependabot! - Updated zod (^4.1.12 -> ^4.3.5) -
#175
2a3a379Thanks @dependabot! - Bump vitest from 3.2.4 to 4.0.16
@izumisy/kyrage@1.5.5
@izumisy/kyrage@1.5.3
Patch Changes
-
#159
7026f08Thanks @dependabot! - Bump c12 from 3.3.0 to 3.3.1 -
#160
5779a2dThanks @dependabot! - Bump ramda from 0.31.3 to 0.32.0
@izumisy/kyrage@1.5.2
Patch Changes
-
#147
1d8161fThanks @dependabot! - Bump zod from 4.1.11 to 4.1.12 -
#150
e8b416fThanks @dependabot! - Bump memfs from 4.48.1 to 4.49.0 -
#151
d995dc0Thanks @dependabot! - Bump mysql2 from 3.15.1 to 3.15.2 -
#148
233c6e7Thanks @dependabot! - Bump kysely from 0.28.7 to 0.28.8 -
#149
e9b5a3eThanks @dependabot! - Bump @types/node from 24.6.2 to 24.7.2
@izumisy/kyrage@1.5.1
@izumisy/kyrage@1.5.0
Minor Changes
-
#131
23e21ebThanks @IzumiSy! - Add foreign key constraint merging to table creation operations with inline control optionKyrage now automatically merges foreign key constraints into
CREATE TABLEstatements alongside existing primary key and unique constraints. This reduces SQL operations and improves migration performance. Addedinlineoption to schema builder'sreference()method for fine-grained control over constraint merging.Example schema with inline foreign key:
import { column as c, defineTable as t } from "@izumisy/kyrage"; const users = t("users", { id: c("uuid", { primaryKey: true }), }); const posts = t( "posts", { id: c("uuid", { primaryKey: true }), userId: c("uuid"), }, (t) => [ // Merged into CREATE TABLE (default: inline: true) t.reference("userId", users, "id"), ] );
Example with separate constraint:
const posts = t( "posts", { id: c("uuid", { primaryKey: true }), userId: c("uuid"), }, (t) => [ // Separate ALTER TABLE statement t.reference("userId", users, "id", { inline: false }), ] );
Patch Changes
-
#131
23e21ebThanks @IzumiSy! - Table operations are now sorted to always respect foreign key and other dependency relationships. Independent tables are ordered alphabetically, ensuring stable and predictable output for migrations and SQL generation.Example:
import { column as c, defineTable as t } from "@izumisy/kyrage"; const users = t("users", { id: c("uuid", { primaryKey: true }), name: c("varchar"), }); const posts = t( "posts", { id: c("uuid", { primaryKey: true }), userId: c("uuid"), content: c("text"), }, (t) => [ t.reference("userId", users, "id"), // posts depends on users ] ); const categories = t("categories", { id: c("uuid", { primaryKey: true }), label: c("varchar"), });
The generated SQL will always be:
CREATE TABLE categories ( id uuid PRIMARY KEY, label varchar ); CREATE TABLE users ( id uuid PRIMARY KEY, name varchar ); CREATE TABLE posts ( id uuid PRIMARY KEY, userId uuid, content text, CONSTRAINT posts_userId_fkey FOREIGN KEY (userId) REFERENCES users(id) );
@izumisy/kyrage@1.4.0
Minor Changes
-
#128
81034d5Thanks @IzumiSy! - Optimize table creation by merging constraints intoCREATE TABLEstatementsKyrage now automatically combines table creation with primary key and unique constraints into a single
CREATE TABLEstatement, reducing the number of SQL operations and improving migration performance.Before:
CREATE TABLE "users" ("id" integer, "email" varchar); ALTER TABLE "users" ADD CONSTRAINT "users_pkey" PRIMARY KEY ("id"); ALTER TABLE "users" ADD CONSTRAINT "users_email_unique" UNIQUE ("email");
After:
CREATE TABLE "users" ( "id" integer, "email" varchar, CONSTRAINT "users_pkey" PRIMARY KEY ("id"), CONSTRAINT "users_email_unique" UNIQUE ("email") );
This optimization happens automatically when generating migrations - no changes to your schema definitions are required.
@izumisy/kyrage@1.3.1
Patch Changes
-
#119
55b769aThanks @IzumiSy! - Fix CockroachDB dialect to filter out system-generatedrowidcolumn during introspectionCockroachDB automatically generates a
rowidcolumn for tables without an explicit primary key. This system-generated column was being included in introspection results, causing unwanted diffs between the actual database schema and user-defined configuration. The CockroachDB dialect now filters out therowidcolumn to match user expectations and prevent false positives in schema comparisons. -
#121
5fcfb5bThanks @IzumiSy! - Fix container detection for dev database commands by properly matching multiple Docker labels. This resolves the issue where users would see "No running dev containers found" even when containers were actually running.The
kyrage dev status,kyrage dev clean, andkyrage dev get-urlcommands were unable to detect running containers due to incomplete label matching in the container detection logic. -
#116
75fca73Thanks @IzumiSy! - Fix migration provider to use the acquired DB connection by Kysely migratorResolves issue where migration provider was not using the acquired DB connection passed to the Migration interface's up method, which is required for databases with connection limits like SQLite.