Giter VIP home page Giter VIP logo

scenic-oracle_adapter's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

scenic-oracle_adapter's Issues

Updating materialized views fails

Migrations that update materialized views via update_view are failing because the no_data keyword argument is not being passed to scenic:

rails db:migrate --trace                                    
Warning: NLS_LANG is not set. fallback to US7ASCII.
** Invoke db:migrate (first_time)
** Invoke db:load_config (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:load_config
** Execute db:migrate
== 20230419145611 UpdateMatvwInvoiceableEntriesToVersion3: migrating ==========
-- update_view(:matvw_invoiceable_entries, {:version=>3, :revert_to_version=>2, :materialized=>true})
rails aborted!
StandardError: An error has occurred, all later migrations canceled:

wrong number of arguments (given 3, expected 2)
/usr/local/bundle/gems/scenic-oracle_adapter-1.2.0/lib/scenic/adapters/oracle.rb:39:in `update_materialized_view'
/usr/local/bundle/gems/scenic-1.7.0/lib/scenic/statements.rb:109:in `update_view'
/usr/local/bundle/gems/activerecord-7.0.4/lib/active_record/migration.rb:932:in `block in method_missing'
/usr/local/bundle/gems/activerecord-7.0.4/lib/active_record/migration.rb:900:in `block in say_with_time'
/usr/local/lib/ruby/3.1.0/benchmark.rb:296:in `measure'
/usr/local/bundle/gems/activerecord-7.0.4/lib/active_record/migration.rb:900:in `say_with_time'
/usr/local/bundle/gems/activerecord-7.0.4/lib/active_record/migration.rb:921:in `method_missing'
/app/db/migrate/20230419145611_update_matvw_invoiceable_entries_to_version_3.rb:4:in `change'
/usr/local/bundle/gems/activerecord-7.0.4/lib/active_record/migration.rb:870:in `exec_migration'
/usr/local/bundle/gems/activerecord-7.0.4/lib/active_record/migration.rb:854:in `block (2 levels) in migrate'
/usr/local/lib/ruby/3.1.0/benchmark.rb:296:in `measure'
/usr/local/bundle/gems/activerecord-7.0.4/lib/active_record/migration.rb:853:in `block in migrate'
/usr/local/bundle/gems/activerecord-7.0.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:215:in `with_connection'
/usr/local/bundle/gems/activerecord-7.0.4/lib/active_record/migration.rb:852:in `migrate'
/usr/local/bundle/gems/activerecord-7.0.4/lib/active_record/migration.rb:1046:in `migrate'
/usr/local/bundle/gems/activerecord-7.0.4/lib/active_record/migration.rb:1360:in `block in execute_migration_in_transaction'
/usr/local/bundle/gems/activerecord-7.0.4/lib/active_record/migration.rb:1413:in `ddl_transaction'
/usr/local/bundle/gems/activerecord-7.0.4/lib/active_record/migration.rb:1359:in `execute_migration_in_transaction'
/usr/local/bundle/gems/activerecord-7.0.4/lib/active_record/migration.rb:1333:in `each'
/usr/local/bundle/gems/activerecord-7.0.4/lib/active_record/migration.rb:1333:in `migrate_without_lock'
/usr/local/bundle/gems/activerecord-7.0.4/lib/active_record/migration.rb:1284:in `migrate'
/usr/local/bundle/gems/activerecord-7.0.4/lib/active_record/migration.rb:1117:in `up'
/usr/local/bundle/gems/activerecord-7.0.4/lib/active_record/migration.rb:1092:in `migrate'
/usr/local/bundle/gems/activerecord-7.0.4/lib/active_record/tasks/database_tasks.rb:262:in `migrate'
/usr/local/bundle/gems/activerecord-7.0.4/lib/active_record/railties/databases.rake:92:in `block (2 levels) in <top (required)>'
/usr/local/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/usr/local/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/usr/local/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/usr/local/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/usr/local/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/usr/local/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
/usr/local/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/local/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/usr/local/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/usr/local/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/usr/local/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/usr/local/bundle/gems/railties-7.0.4/lib/rails/commands/rake/rake_command.rb:24:in `block (2 levels) in perform'
/usr/local/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/local/bundle/gems/railties-7.0.4/lib/rails/commands/rake/rake_command.rb:24:in `block in perform'
/usr/local/lib/ruby/gems/3.1.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in `with_application'
/usr/local/bundle/gems/railties-7.0.4/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/usr/local/bundle/gems/railties-7.0.4/lib/rails/command.rb:51:in `invoke'
/usr/local/bundle/gems/railties-7.0.4/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'

OCIError: ORA-00907: missing right parenthesis

On some Oracle databases the following query:

create view "entries" as SELECT 'posting' as type,
FROM postings

UNION ALL

SELECT 'reservation' as type,        
FROM reservations

returns the error in subject.

Should `update_view` work for materialized views

Should this work as a migration?

    update_view :my_mview,
      version: 2,
      revert_to_version: 1,
      materialized: true

When we tried it we got errors from Oracle about a syntax problem. But switching to a drop_view followed by create_view worked fine.

Requiring OCI8

@cdinger I was looking to include this gem in one of my projects, but it requires the OCI8 gem. We use JRuby w/ our application so we cannot use OCI8.

Is it possible to have that dependency removed?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.