You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A GitHub Action that previews SQL schema migrations of [sqldef](https://github.com/sqldef/sqldef) on pull requests. It automatically generates a preview of schema changes between your base branch and PR branch, posting the DDLs as a comment on your pull request.
6
+
A GitHub Action that previews SQL schema migrations of [sqldef](https://github.com/sqldef/sqldef) on pull requests. It automatically generates a preview of schema changes between your base branch and PR branch, posting the migration DDL as a comment on your pull request.
7
7
8
8
## Features
9
9
@@ -69,6 +69,7 @@ jobs:
69
69
pg-user: postgres
70
70
pg-password: postgres
71
71
pg-database: testdb
72
+
github-token: ${{ github.token }}
72
73
```
73
74
74
75
### MySQL Example
@@ -105,6 +106,7 @@ jobs:
105
106
mysql-password: testpassword
106
107
mysql-host: 127.0.0.1
107
108
mysql-database: testdb
109
+
github-token: ${{ github.token }}
108
110
```
109
111
110
112
### SQLite Example
@@ -115,6 +117,7 @@ jobs:
115
117
command: sqlite3def
116
118
schema-file: schema/database.sql
117
119
sqlite-database: test.db
120
+
github-token: ${{ github.token }}
118
121
```
119
122
120
123
### SQL Server Example
@@ -160,6 +163,7 @@ jobs:
160
163
mssql-user: SA
161
164
mssql-password: YourStrong@Passw0rd
162
165
mssql-database: testdb
166
+
github-token: ${{ github.token }}
163
167
```
164
168
165
169
## Input Parameters
@@ -170,15 +174,14 @@ jobs:
170
174
|-----------|-------------|----------|
171
175
| `command` | SQLDef command to use: `psqldef`, `mysqldef`, `sqlite3def`, or `mssqldef` | ✅ |
172
176
| `schema-file` | Path to the SQL schema file | ✅ |
177
+
| `github-token` | GitHub token for commenting on pull requests | ✅ |
173
178
174
179
### Optional Parameters
175
180
176
181
| Parameter | Description | Default |
177
182
|-----------|-------------|---------|
178
-
| `version` | Version of sqldef to use (e.g., `v3.0.0` or `latest`) | `v3.0.0` |
179
-
| `baseline-schema-file` | Path to baseline schema file for comparison | Auto-fetched from base branch |
183
+
| `version` | Version of sqldef to use (e.g., `v3.0.1` or `latest`) | `v3.0.1` |
This comment was created by sqldef-preview-action.
234
+
This comment was generated by [SQLDef Preview](https://github.com/YOUR_ORGANIZATION/YOUR_REPO/actions/runs/RUN_ID), powered by [sqldef/sqldef-preview-action](https://github.com/sqldef/sqldef-preview-action).
0 commit comments