
oracle adapter has information schema bug
Reported by mrruby | May 30th, 2010 @ 12:07 PM | in 1.1
using a simple two table data model
I get following error when doing an auto_migrate
~ ORA-00942: table or view does not exist (code: 942, sql state:
, query: SELECT COUNT(*) FROM "information_s
chema"."table_constraints" WHERE "constraint_type" = 'FOREIGN KEY'
AND "table_schema" = :1 AND "table_name" =
:2 AND "constraint_name" = :3, uri: ......
Seems that mysql stuff is used for oracle: information_schema.table_constraints?
Best Regards,
Ad.
Comments and changes to this ticket
-
mrruby May 30th, 2010 @ 12:09 PM
note schema used was:
class Optcase
include DataMapper::Resource property :id, Serial property :name, String, :length => 250, :required => true has n, :optcase_param endclass OptcaseParam
include DataMapper::Resource property :id, Serial property :name, String, :required => true property :value, String, :required => true belongs_to :optcase endBR,
Ad. -
Dan Kubb (dkubb) May 30th, 2010 @ 09:21 PM
- State changed from new to unconfirmed
- Assigned user changed from Dan Kubb (dkubb) to Raimonds Simanovskis
The information_schema database is actually a standard set of tables that databases can implement that provides details about other databases. PostgreSQL supports it in addition to MySQL. Even Oracle has some support for it, but apparently it is limited.
Assigning this to Raimonds to look at, as he may have more information to share, and if there are known work-arounds to get the same information from an Oracle specific API.
-
Daniel Neighman June 20th, 2010 @ 10:28 PM
I also get this error when trying to access the oracle database. This seems to be somewhat of a new issue and it is preventing our application from going out :(
-
Daniel Neighman June 22nd, 2010 @ 06:34 PM
I've updated the dm-constraints gem (The cause of this issue) in our NZX repo at https://github.com/NZX/dm-constraints
This update is for all of the oracle constraint related issues that I've been able to find.
https://github.com/NZX/dm-constraints/commit/b29624cac9ac23eb84fc8e...
-
Daniel Neighman June 22nd, 2010 @ 06:45 PM
On a related note, I also updated dm-migrations so that it could drop tables correctly.
this is available at http://github.com/NZX/dm-migrations
http://github.com/NZX/dm-migrations/commit/b02450ed622a884a65417d0c...
-
Dan Kubb (dkubb) January 14th, 2011 @ 09:05 PM
- Milestone order changed from 0 to 0
(from [b6cfda15f326a42901b3e6845cb81158d529ce1b]) Updates the oracle adapter to have a more robust drop table statement.
[#1298] https://github.com/datamapper/dm-migrations/commit/b6cfda15f326a429...
-
Dan Kubb (dkubb) January 14th, 2011 @ 09:05 PM
(from [999718452640578b4090f58be5f47457a617566e]) Remove the drop_table from the oracle adapter.
This belongs in the migrations plugin
[#1298] https://github.com/datamapper/dm-constraints/commit/999718452640578...
-
Dan Kubb (dkubb) January 14th, 2011 @ 09:05 PM
(from [804d9bd1305ab94453ba5d48be041319df77b22e]) Updaets the oracle adapter with the correct sql
[#1298] https://github.com/datamapper/dm-constraints/commit/804d9bd1305ab94...
-
Martin Gamsjaeger (snusnu) January 14th, 2011 @ 09:06 PM
- State changed from unconfirmed to resolved
- Milestone set to 1.1
- Milestone order changed from 196200 to 0
Thx for the patches Daniel!
-
mrruby January 28th, 2011 @ 05:00 PM
Hi,
Is there an easy way to get this 1.1 milestone today?
All I would like to do is to issue a command like:
gem install data_mapper dm-oracle-adapter --no-ri --no-rdoc
But today this gives me the 1.0.2 version.
BR,
Ad. -
mrruby January 29th, 2011 @ 03:00 AM
Note: ofcourse I mean how to get what is today already available of the 1.1 milestone.
-
mrruby January 29th, 2011 @ 01:27 PM
- Assigned user changed from Raimonds Simanovskis to Dan Kubb (dkubb)
I could fetch the two master (dm-migrations & dm-constraints) and replace the 1.0.2 milestone gem with these new gems.
Unfortunately DataMapper.auto_migrate! gives following exception:
undefined method
source_repository_name' for #<Array:0x373b178><br/> c:/ruby/lib/ruby/gems/1.8/gems/dm-constraints-1.0.2/lib/dm-constraints/adapters/dm-do-adapter.rb:106:in
valid
_relationship_for_constraint?' c:/ruby/lib/ruby/gems/1.8/gems/dm-constraints-1.0.2/lib/dm-constraints/adapters/dm-do-adapter.rb:78:indestro<br/> y\_relationship\_constraint'<br/> c:/ruby/lib/ruby/gems/1.8/gems/dm-constraints-1.0.2/lib/dm-constraints/migrations.rb:51:in
send'
c:/ruby/lib/ruby/gems/1.8/gems/dm-constraints-1.0.2/lib/dm-constraints/migrations.rb:51:inexecute_each_relat<br/> ionship'<br/> c:/ruby/lib/ruby/gems/1.8/gems/dm-constraints-1.0.2/lib/dm-constraints/migrations.rb:50:in
each'
c:/ruby/lib/ruby/gems/1.8/gems/dm-constraints-1.0.2/lib/dm-constraints/migrations.rb:50:inexecute_each_relat<br/> ionship'<br/> c:/ruby/lib/ruby/gems/1.8/gems/dm-constraints-1.0.2/lib/dm-constraints/migrations.rb:38:in
auto_migrate_down_
constraints!'
c:/ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.2/lib/dm-migrations/auto_migration.rb:45:insend'<br/> c:/ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.2/lib/dm-migrations/auto_migration.rb:45:in
repository_execu
te'
c:/ruby/lib/ruby/gems/1.8/gems/dm-core-1.0.2/lib/dm-core/support/descendant_set.rb:68:ineach'<br/> c:/ruby/lib/ruby/gems/1.8/gems/dm-core-1.0.2/lib/dm-core/support/descendant_set.rb:67:in
each'
c:/ruby/lib/ruby/gems/1.8/gems/dm-migrations-1.0.2/lib/dm-migrations/auto_migration.rb:44:inrepository_execu<br/> te'<br/> c:/ruby/lib/ruby/gems/1.8/gems/dm-constraints-1.0.2/lib/dm-constraints/migrations.rb:10:in
auto_migrate!'
D:/agRuby/ag2010/oracle-datamapper-trial/rakefile:14
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:incall'<br/> c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
execute'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:ineach'<br/> c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
execute'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:ininvoke_with_call_chain'<br/> c:/ruby/lib/ruby/1.8/monitor.rb:238:in
synchronize'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:ininvoke_with_call_chain'<br/> c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in
invoke'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:ininvoke_task'<br/> c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
top_level'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:ineach'<br/> c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
top_level'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling'<br/> c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in
top_level'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:inrun'<br/> c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:inrun'<br/> c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31<br/> c:/ruby/bin/rake:19:in
load'
c:/ruby/bin/rake:19
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
People watching this ticket
Referenced by
-
1298 oracle adapter has information schema bug [#1298] https://github.com/datamapper/dm-migrations/comm...
-
1298 oracle adapter has information schema bug [#1298] https://github.com/datamapper/dm-constraints/com...
-
1298 oracle adapter has information schema bug [#1298] https://github.com/datamapper/dm-constraints/com...