File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
packages/runtime/src/client/helpers Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 1616- [ ] ZModel
1717 - [x] Import
1818 - [ ] View support
19+ - [ ] Datasource provider-scoped attributes
1920- [ ] ORM
2021 - [x] Create
2122 - [ x] Input validation
Original file line number Diff line number Diff line change @@ -188,6 +188,10 @@ export class SchemaDbPusher<Schema extends SchemaDef> {
188188 return 'serial' ;
189189 }
190190
191+ if ( this . isCustomType ( fieldDef . type ) ) {
192+ return 'jsonb' ;
193+ }
194+
191195 const type = fieldDef . type as BuiltinType ;
192196 const result = match < BuiltinType , ColumnDataType > ( type )
193197 . with ( 'String' , ( ) => 'text' )
@@ -211,6 +215,10 @@ export class SchemaDbPusher<Schema extends SchemaDef> {
211215 }
212216 }
213217
218+ private isCustomType ( type : string ) {
219+ return this . schema . typeDefs && Object . values ( this . schema . typeDefs ) . some ( ( def ) => def . name === type ) ;
220+ }
221+
214222 private isAutoIncrement ( fieldDef : FieldDef ) {
215223 return (
216224 fieldDef . default &&
You can’t perform that action at this time.
0 commit comments