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

Add Support for Check Constraint - Backend code changes #945

Open
wants to merge 38 commits into
base: master
Choose a base branch
from

Conversation

taherkl
Copy link

@taherkl taherkl commented Nov 27, 2024

Backend Support for Check Constraint

Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

  • Tests pass
  • Appropriate changes to README are included in PR

Backend code changes to support CHECK CONSTRAINTS

  1. Added DB Collation regex on the constants
  2. Added helper function for generating Check constraints ID
  3. Updated Conv schema to support Check Constraints
  4. CRUD operation for check constraints expressions to Spanner DDL
  5. Added regex pattern validation to check constraints name, table name and database collation

Backend Support for Check Constraint
@taherkl taherkl changed the title Check constraint backend (#9) Add Support for Check Constraint - Backend code changes Nov 27, 2024
sources/common/toddl.go Outdated Show resolved Hide resolved
spanner/ddl/ast.go Outdated Show resolved Hide resolved
spanner/ddl/ast_test.go Outdated Show resolved Hide resolved
webv2/api/schema.go Outdated Show resolved Hide resolved
webv2/api/schema.go Outdated Show resolved Hide resolved
webv2/api/schema.go Outdated Show resolved Hide resolved
@asthamohta
Copy link
Collaborator

There are two things missing in this PR:

  1. Either a separate PR or in the same PR we need ot make setting instance and project name mandatory on the page before schema migration.
  2. The validation call is not called when prepare migration is clicked.

internal/reports/report_helpers.go Show resolved Hide resolved
sources/mysql/infoschema.go Outdated Show resolved Hide resolved
sources/mysql/infoschema.go Outdated Show resolved Hide resolved
sources/mysql/infoschema.go Outdated Show resolved Hide resolved
spanner/ddl/ast.go Outdated Show resolved Hide resolved
spanner/ddl/ast.go Outdated Show resolved Hide resolved
webv2/api/schema.go Outdated Show resolved Hide resolved
internal/mapping.go Outdated Show resolved Hide resolved
@asthamohta
Copy link
Collaborator

Where are the ADD and DELETE APIs for check constraints?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants