@@ -179,7 +179,7 @@ async function getSchemaFromBranch(branch: string, schemaFile: string): Promise<
179179 return tempFile ;
180180}
181181
182- async function runSqldef ( binaryPath : string , config : CommandConfig ) : Promise < string > {
182+ async function runSqldef ( sqldefPath : string , config : CommandConfig ) : Promise < string > {
183183 let output = "" ;
184184 let stderr = "" ;
185185
@@ -191,19 +191,24 @@ async function runSqldef(binaryPath: string, config: CommandConfig): Promise<str
191191 }
192192 Object . assign ( execEnv , config . env ) ;
193193
194- const exitCode = await exec . exec ( binaryPath , config . args , {
195- env : execEnv ,
196- silent : false ,
197- ignoreReturnCode : true ,
198- listeners : {
199- stdout : ( data : Buffer ) => {
200- output += data . toString ( ) ;
201- } ,
202- stderr : ( data : Buffer ) => {
203- stderr += data . toString ( ) ;
194+ // apply the schema to the database
195+ const exitCode = await exec . exec (
196+ sqldefPath ,
197+ [ "--config-inline" , "legacy_ignore_quotes: false" , "--apply" , ...config . args ] ,
198+ {
199+ env : execEnv ,
200+ silent : false ,
201+ ignoreReturnCode : true ,
202+ listeners : {
203+ stdout : ( data : Buffer ) => {
204+ output += data . toString ( ) ;
205+ } ,
206+ stderr : ( data : Buffer ) => {
207+ stderr += data . toString ( ) ;
208+ } ,
204209 } ,
205210 } ,
206- } ) ;
211+ ) ;
207212
208213 if ( exitCode !== 0 ) {
209214 if ( stderr ) {
0 commit comments