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

Include check constraints in structure.sql #2213

Open
benny-burkhart opened this issue Oct 21, 2021 · 0 comments
Open

Include check constraints in structure.sql #2213

benny-burkhart opened this issue Oct 21, 2021 · 0 comments

Comments

@benny-burkhart
Copy link

Steps to reproduce

In an app, in a migration, specify a check constraint, along these lines:
ActiveRecord::Base.connection.execute('ALTER TABLE test_posts add CONSTRAINT foo_is_json CHECK(foo is json)')

Configure the app to use schema format SQL. In config/application.rb specify:
config.active_record.schema_format = :sql

Expected behavior

After a db:migrate, the alter table ... add constraint ... check ... should appear in db/structure.sql.

Actual behavior

The constraint is omitted.

System configuration

Rails version: 6.1.4.1

Oracle enhanced adapter version: 6.1.4

Ruby version: 2.7.4p191

Oracle Database version: 19c enterprise

benny-burkhart pushed a commit to benny-burkhart/oracle-enhanced that referenced this issue Oct 21, 2021
benny-burkhart pushed a commit to benny-burkhart/oracle-enhanced that referenced this issue Dec 1, 2021
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

No branches or pull requests

1 participant