Skip to content

Commit ff81f91

Browse files
Version Packages (#129)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 81034d5 commit ff81f91

File tree

3 files changed

+30
-27
lines changed

3 files changed

+30
-27
lines changed

.changeset/add-create-table-with-constraints-op.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

packages/cli/CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
11
# @izumisy/kyrage
22

3+
## 1.4.0
4+
5+
### Minor Changes
6+
7+
- [#128](https://github.com/IzumiSy/kyrage/pull/128) [`81034d5`](https://github.com/IzumiSy/kyrage/commit/81034d5e6fb4ca5f6950bacdd5da184f6faf6f89) Thanks [@IzumiSy](https://github.com/IzumiSy)! - Optimize table creation by merging constraints into `CREATE TABLE` statements
8+
9+
Kyrage now automatically combines table creation with primary key and unique constraints into a single `CREATE TABLE` statement, reducing the number of SQL operations and improving migration performance.
10+
11+
**Before:**
12+
13+
```sql
14+
CREATE TABLE "users" ("id" integer, "email" varchar);
15+
ALTER TABLE "users" ADD CONSTRAINT "users_pkey" PRIMARY KEY ("id");
16+
ALTER TABLE "users" ADD CONSTRAINT "users_email_unique" UNIQUE ("email");
17+
```
18+
19+
**After:**
20+
21+
```sql
22+
CREATE TABLE "users" (
23+
"id" integer,
24+
"email" varchar,
25+
CONSTRAINT "users_pkey" PRIMARY KEY ("id"),
26+
CONSTRAINT "users_email_unique" UNIQUE ("email")
27+
);
28+
```
29+
30+
This optimization happens automatically when generating migrations - no changes to your schema definitions are required.
31+
332
## 1.3.1
433

534
### Patch Changes

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@izumisy/kyrage",
33
"private": false,
44
"type": "module",
5-
"version": "1.3.1",
5+
"version": "1.4.0",
66
"description": "A minimal, schema-based declarative migration tool for Node.js ecosystem",
77
"author": "Seiya Izumi (https://github.com/IzumiSy)",
88
"license": "MIT",

0 commit comments

Comments
 (0)