Skip to content

Foreign Key Check logic causes conflicts on sqlite db implementation. #50

Description

@georgestephanis

I was testing this on Studio as a local dev environment (which implements sqlite db instead of MySQL / MariaDB) and got some issues due to assumptions in the code about foreign key checks --

https://github.com/stellarwp/schema/blob/main/src/Schema/Tables/Contracts/Table.php#L274-L284

<b>Warning</b>:  Attempt to read property "Value" on null in <b>/wordpress/wp-content/plugins/kadence-blocks/vendor/vendor-prefixed/stellarwp/schema/src/Schema/Tables/Contracts/Table.php</b> on line <b>179</b><br />
--
<br />
<b>Warning</b>:  Attempt to read property "Value" on null in <b>/wordpress/wp-content/plugins/kadence-blocks/vendor/vendor-prefixed/stellarwp/schema/src/Schema/Tables/Contracts/Table.php</b> on line <b>184</b><br />
<br />
<b>Warning</b>:  Attempt to read property "Value" on null in <b>/wordpress/wp-content/plugins/kadence-blocks/vendor/vendor-prefixed/stellarwp/schema/src/Schema/Tables/Contracts/Table.php</b> on line <b>179</b><br />
<br />
<b>Warning</b>:  Attempt to read property "Value" on null in <b>/wordpress/wp-content/plugins/kadence-blocks/vendor/vendor-prefixed/stellarwp/schema/src/Schema/Tables/Contracts/Table.php</b> on line <b>184</b><br />

It feels like some safety rails around key_check testing if it's available would be useful for implementation in various environments.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions