Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion examples/mssql.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
enable_drop: true
legacy_ignore_quotes: false
enable_drop: true
3 changes: 2 additions & 1 deletion examples/mysqldef.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
enable_drop: true
legacy_ignore_quotes: false
enable_drop: true
1 change: 1 addition & 0 deletions examples/psqldef.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
legacy_ignore_quotes: false
enable_drop: true
create_index_concurrently: true
3 changes: 2 additions & 1 deletion examples/sqlite3def.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
enable_drop: true
legacy_ignore_quotes: false
enable_drop: true
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.0",
"description": "GitHub Action to preview schema changes using sqldef",
"main": "dist/index.js",
"private": true,
"scripts": {
"build": "tsc",
"format": "prettier --write **/*.ts",
Expand All @@ -18,7 +19,7 @@
"database",
"schema"
],
"author": "",
"author": "sqldef team",
"license": "MIT",
"dependencies": {
"@actions/core": "latest",
Expand Down
5 changes: 3 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ async function getSchemaFromBranch(branch: string, schemaFile: string): Promise<
return tempFile;
}

async function runSqldef(binaryPath: string, config: CommandConfig): Promise<string> {
async function runSqldef(sqldefPath: string, config: CommandConfig): Promise<string> {
let output = "";
let stderr = "";

Expand All @@ -191,7 +191,8 @@ async function runSqldef(binaryPath: string, config: CommandConfig): Promise<str
}
Object.assign(execEnv, config.env);

const exitCode = await exec.exec(binaryPath, config.args, {
// apply the schema to the database
const exitCode = await exec.exec(sqldefPath, ["--apply", ...config.args], {
env: execEnv,
silent: false,
ignoreReturnCode: true,
Expand Down