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
Copy file name to clipboardExpand all lines: database/spanner/README.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ See [Google Spanner Documentation](https://cloud.google.com/spanner/docs) for de
12
12
| Param | WithInstance Config | Description |
13
13
| ----- | ------------------- | ----------- |
14
14
|`x-migrations-table`|`MigrationsTable`| Name of the migrations table |
15
+
|`x-clean-statements`|`CleanStatements`| Whether to parse and clean DDL statements before running migration towards Spanner (Required for comments and multiple statements) |
15
16
|`url`|`DatabaseName`| The full path to the Spanner database resource. If provided as part of `Config` it must not contain a scheme or query string to match the format `projects/{projectId}/instances/{instanceId}/databases/{databaseName}`|
16
17
| `projectId` || The Google Cloud Platform project id
17
18
| `instanceId` || The id of the instance running Spanner
@@ -28,6 +29,15 @@ See [Google Spanner Documentation](https://cloud.google.com/spanner/docs) for de
At the moment the GCP Spanner backed does not seem to allow for comments (See https://issuetracker.google.com/issues/159730604)
35
+
so in order to be able to use migration with DDL containing comments `x-clean-stamements` is required
36
+
37
+
## Multiple statements
38
+
39
+
In order to be able to use more than 1 DDL statement in the same migration file, the file has to be parsed and therefore the `x-clean-statements` flag is required
40
+
31
41
## Testing
32
42
33
43
To unit test the `spanner` driver, `SPANNER_DATABASE` needs to be set. You'll
0 commit comments