Skip to content

Include check constraints in structure.sql #2213

Open
@benny-burkhart

Description

@benny-burkhart

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions