Skip to content

Commit

Permalink
test: spanner test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MXPOL committed Nov 28, 2023
1 parent 6e6c6ac commit 95a3245
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libs/external-db-spanner/src/spanner_schema_provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ export default class SchemaProvider implements ISchemaProvider {
.map( (c: InputField) => this.sqlSchemaTranslator.columnToDbColumnSql(c) )
.join(', ')

await this.updateSchema(`CREATE TABLE ${escapeId(collectionName)} (${dbColumnsSql}) PRIMARY KEY (${PrimaryKeyFieldName})`, collectionName, CollectionAlreadyExists)
// Remind: Spanner doesnt allow to create fields with _ in the beginning, so all the system fields are patched with x in the beginning
await this.updateSchema(`CREATE TABLE ${escapeId(collectionName)} (${dbColumnsSql}) PRIMARY KEY (x${PrimaryKeyFieldName})`, collectionName, CollectionAlreadyExists)
}

async addColumn(collectionName: string, column: InputField): Promise<void> {
Expand Down

0 comments on commit 95a3245

Please sign in to comment.