Given the following schema:
CREATE TABLE `MyReferencedTable`(
`MyReferencedId` INT64 NOT NULL
) PRIMARY KEY (`MyReferencedId`);
CREATE TABLE `MyTable`(
`MyId` INT64 NOT NULL,
`MyData` INT64,
CONSTRAINT `MyDataFk` FOREIGN KEY (`MyData`)
REFERENCES `MyReferencedTable` (`MyReferencedId`) NOT ENFORCED
) PRIMARY KEY (`MyId`);
We still find that:
spanner> select enforced from information_schema.table_constraints where constraint_name='MyDataFk';
+----------+
| enforced |
+----------+
| YES |
+----------+
1 rows in set (3.628125ms)
Note that not enforced seem to work fine on the emulator, just misreported on information_schema.
On prod spanner, there is no such reporting issue.
Given the following schema:
We still find that:
Note that
not enforcedseem to work fine on the emulator, just misreported on information_schema.On prod spanner, there is no such reporting issue.