Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
SQLite3: Implement `add_foreign_key` and `remove_foreign_key` #35212
I implemented Foreign key create in
I implemented Foreign key create in `create_table` for SQLite3 at #24743. This follows #24743 to implement `add_foreign_key` and `remove_foreign_key`. Unfortunately SQLite3 has one limitation that `PRAGMA foreign_key_list(table-name)` doesn't have constraint name. So we couldn't implement find/remove foreign key by name for now. Fixes #35207. Closes #31343.
…s_in_create?` Follow up of rails/rails#35212. This PR fixes the following error. ```console $ bundle exec rspec ./spec/active_record/connection_adapters/oracle_enhanced/connection_spec.rb:179 (snip) Failures: 1) OracleEnhancedConnection default_timezone should respect default_timezone = :utc than time_zone setting Failure/Error: if supports_foreign_keys_in_create? NoMethodError: undefined method `supports_foreign_keys_in_create?' for #<ActiveRecord::ConnectionAdapters::OracleEnhanced::SchemaCreation:0x0000000003ef9108> Did you mean? supports_foreign_keys? # ./lib/active_record/connection_adapters/oracle_enhanced/schema_creation.rb:24:in `visit_TableDefinition' # /home/vagrant/.rvm/gems/ruby-2.6.0/bundler/gems/rails-8d9d46fdae45/activerecord/lib/active_record/connection_adapters/abstract/schema_creation.rb:14:in `accept' # ./lib/active_record/connection_adapters/oracle_enhanced/schema_statements.rb:233:in `create_table' ``` https://travis-ci.org/rsim/oracle-enhanced/jobs/492524301#L932