File tree Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -153,4 +153,6 @@ async function init() {
153153 Deno . exit ( 1 ) ;
154154 }
155155}
156- init ( ) ;
156+ if ( import . meta. main ) {
157+ init ( ) ;
158+ }
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ export function formatColumnName(column: string): string {
1010 const reservedWords = [
1111 "order" ,
1212 "user" ,
13+ "primary" ,
1314 "group" ,
1415 "table" ,
1516 "column" ,
Original file line number Diff line number Diff line change @@ -51,13 +51,7 @@ export class MigrationPlanner {
5151
5252 async createMigrationPlan ( ) : Promise < MigrationPlan > {
5353 this . migrationPlan = new MigrationPlan ( ) ;
54- if ( ! this . db . dbName ) {
55- raiseORMException (
56- "Database name is not set. Please provide a valid database name." ,
57- "MigrationPlanner" ,
58- ) ;
59- }
60- this . migrationPlan . database = this . db . dbName ;
54+ this . migrationPlan . database = this . db . dbName || "" ;
6155 this . migrationPlan . schema = this . db . schema ;
6256
6357 for ( const migrator of this . entryTypes . values ( ) ) {
You can’t perform that action at this time.
0 commit comments