Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update JSON schema to specify that not all Column fields are required #265

Merged
merged 5 commits into from
Feb 2, 2024

Conversation

andrew-farries
Copy link
Collaborator

Update the JSON schema in schema.json to state that only name and type are required fields when specifying a column.

Previously required was set to ["name", "nullable", "pk", "type", "unique"] resulting in some valid create_table and add_column migrations failing to validate.

Add two new testcases to the JSON schema tests to cover 'create_table' and 'add_column' operations.

Show that not all properties of a column need to be specified.
Show that not all properties of a column need to be specified.
`nullable`, `pk`, and `unique` are optional.
Add methods to column to retrieve nullability, pk and unique now that
the underlying fields are optional (pointers).
@SferaDev
Copy link
Member

SferaDev commented Feb 2, 2024

Spec LGTM

@andrew-farries andrew-farries merged commit d06a0af into main Feb 2, 2024
26 checks passed
@andrew-farries andrew-farries deleted the column-json-schema branch February 2, 2024 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants