@prisma-next/sql-schema-ir 0.0.1 → 0.1.0-pr.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -4
- package/dist/exports/types.d.ts +1 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ This package defines the core types for the SQL Schema IR, a target-agnostic rep
|
|
|
39
39
|
|
|
40
40
|
- **`SqlSchemaIR`** - Complete database schema representation with tables, extensions, and annotations
|
|
41
41
|
- **`SqlTableIR`** - Table representation with columns, constraints, indexes, and annotations
|
|
42
|
-
- **`SqlColumnIR`** - Column representation with `
|
|
42
|
+
- **`SqlColumnIR`** - Column representation with `nativeType` (DB-specific type), nullability, and annotations
|
|
43
43
|
- **`SqlForeignKeyIR`** - Foreign key constraint representation
|
|
44
44
|
- **`SqlUniqueIR`** - Unique constraint representation
|
|
45
45
|
- **`SqlIndexIR`** - Index representation
|
|
@@ -47,7 +47,7 @@ This package defines the core types for the SQL Schema IR, a target-agnostic rep
|
|
|
47
47
|
|
|
48
48
|
### Key Design Decisions
|
|
49
49
|
|
|
50
|
-
1.
|
|
50
|
+
1. **Native type primary**: Columns capture the database-native type (`nativeType`, e.g., `'integer'`, `'vector'`). Codec IDs now live exclusively in the contract—schema IR focuses solely on what exists in the database. This keeps schema verification centered on actual storage, while contract metadata handles codec-level concerns.
|
|
51
51
|
|
|
52
52
|
2. **Annotations**: All IR types support optional `annotations` for extensibility. This allows targets and extensions to attach metadata without modifying the core IR structure.
|
|
53
53
|
|
|
@@ -67,13 +67,11 @@ const schemaIR: SqlSchemaIR = {
|
|
|
67
67
|
columns: {
|
|
68
68
|
id: {
|
|
69
69
|
name: 'id',
|
|
70
|
-
typeId: 'pg/int4@1',
|
|
71
70
|
nativeType: 'integer',
|
|
72
71
|
nullable: false,
|
|
73
72
|
},
|
|
74
73
|
email: {
|
|
75
74
|
name: 'email',
|
|
76
|
-
typeId: 'pg/text@1',
|
|
77
75
|
nativeType: 'text',
|
|
78
76
|
nullable: false,
|
|
79
77
|
},
|
package/dist/exports/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma-next/sql-schema-ir",
|
|
3
|
-
"version": "0.0.1",
|
|
3
|
+
"version": "0.1.0-pr.32.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "SQL Schema IR types for schema introspection and verification",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@prisma-next/contract": "0.0.1"
|
|
8
|
+
"@prisma-next/contract": "0.1.0-pr.32.1"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
11
|
"@vitest/coverage-v8": "^2.1.1",
|