Displaying 20 results from an estimated 100 matches similar to: "Multi-databases support"
2010 Nov 09
2
Undefined method
I am very new to ROR. (Ruby 1.8.7, rails 2.1.1, rack
0.8.7, mysql 5.1.41)
I has my_app/lib/migration_helpers.rb file:
module MigrationHelpers
def self.foreign_key(from_table, from_column, to_table)
constraint_name = "fk_#{from_table}_#{to_table}"
execute %{alter table #{from_table}
add constraint #{constraint_name}
foreign key (#{from_column})
2008 Jul 04
4
Libs directory
Hello,
I had an application on Rails 1.2 or 1.1 (don''t remember). Now I have
updated it to 2.1.
I had a migrations_helper.rb in the Libs directory which defined
foreign_key and drop_foreign_key methods. But now migrate task doesn''t
find them. Have I to include this directory somewhere with Rails 2.1?
Doesn''t it work as always?
Could I use another thing to declare
2011 Nov 28
29
Lack of foreign-key constraints support in ActiveRecord
Is there any reason why AR has never supported foreign-key constraints?
I can understand the lack of support for triggers and stored procedures
since they are highly dependent on the database to create a wrap API
around them. But this is not the case for foreign keys.
This is specially important for open-source projects like
Redmine/Chiliproject and Gitorious where you shouldn''t be
2011 Jun 11
1
Having a problem adding a foreign key
I keep getting this exception "SQLite3::SQLException: no such
column: books.user_id: SELECT "books".* FROM "books" WHERE
("books".user_id = 4)" ,which sounds like there is no user_id in books
table.So i just installed foreigner plugin and added "
t.integer :user_id, :null => false" and
"add_foreign_key(:books, :users)" in book
2013 Mar 11
0
Any interest in various features from "schema_plus" gem?
Hello (I''m new to this group so please pardon any inappropriateness),
I''m a primary maintainer of the schema_plus gem<https://github.com/lomba/schema_plus/>,
which adds some capabilities to rails'' schema definitions. The gem has
been around for several years and is pretty reliable. I''ve been wondering
whether there''d be interest in folding
2006 Feb 17
1
foreign key support in mysql adapter
Hi!
I''m using Migration to define my database schema and these "ALTER TABLE
t ADD FOREIGN KEY..." look really ugly - that''s why I wanted to ask it
would be possible to simply add add_foreign_key method to ActiveRecord?
Are there any reasons this isn''t yet implemented?
Greetings,
Esad
--
Posted via http://www.ruby-forum.com/.
2006 Jul 10
3
Can migrations set up foreign key references?
I use Oracle and i really want to use migrations, but there seems to be
no way to setup foreign key constraints. Is this true? If it is then
doesn''t that make migrations useles with Oracle?
Thanks
Chris
--
Posted via http://www.ruby-forum.com/.
2006 Jan 18
3
Support for foreign keys in Migrations
Is there any work being done to add support for defining foreign keys in
ActiveRecord Migrations? If not is it something that people would find
useful or do most people here believe in the "Application Database" style
over the "Integration Database" style [1] as defined by Fowler?
I''d love to see support for foreign keys in Migrations. For selfish reasons
2008 Mar 19
2
ActiveRecord bug? ActiveRecord::ConnectionAdapters::Column.type_cast for float columns
Hi all,
I just noticed that in ActiveRecord::ConnectionAdapters::Column.type_cast[1]
(and type_cast_code[2]) the type casting for float columns simply does
value.to_f, whereas all the others have a rescue or call out to a method,
the default implementations of which have rescues or enough logic in that I
don''t think they''d fail.
Imagine the following:
create_table :vehicle do
2008 Jun 24
9
ActiveRecord 2.1 Migration support
Hi all,
I am in the process of adding Migration support to the Ingres
ActiveRecord adapter and have run in to a problem. During the call to
create_table the Ingres adapter some how causes ruby to blow the stack
and coredump/segv. I have tracked down the problem down to
"add_column_options!" in
"lib/active_record/connection_adapters/abstract/schema_statements.rb".
2008 Jun 24
9
ActiveRecord 2.1 Migration support
Hi all,
I am in the process of adding Migration support to the Ingres
ActiveRecord adapter and have run in to a problem. During the call to
create_table the Ingres adapter some how causes ruby to blow the stack
and coredump/segv. I have tracked down the problem down to
"add_column_options!" in
"lib/active_record/connection_adapters/abstract/schema_statements.rb".
2010 Jul 16
1
Rails 3 bug: undefined method `<=>' for class `ActiveSupport::Multibyte::Chars'
I''m getting the following bug when I try to run rake db:migrate in
Rails 3 beta 4:
$ rake db:migrate --trace
(in C:/Users/Adam/Documents/Aptana Workspace/QuestionBank)
default formats are encoded in ISO-8859-1
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
== CreateUsers: migrating
2006 Jul 05
7
HABTM join table has an "ID" column - is this an issue?
All,
I''m building model objects for existing tables that I cannot modify.
In AWDWR, Dave says "Note that our join table has no id column...The
second reason for not including an id column in the join table is that
AR automatically includes all columns from the join tables when
accessing rows using it. If the join table included a column called id,
its id would overwrite the id
2006 Apr 26
5
accessing created_on causes type error
I assume that this is some newbie stupidity, but I haven''t found my
way around this problem. I have an ActiveRecord object fetched
from the database, and I need to evaluate the contents of the
updated_on field. However, *any* attempt to access that data in the
program results in a TypeError with the message ''no implicit conversion
from nil to integer''.
cust =
2008 Jul 15
9
Beginner Question.
I''m just getting into RoR, coming from a long PHP background. So far I
LOVE IT!
I''m hitting a roadblock with updating my mysql database. For
simplicities sake, I have 2 tables and here are the relevant columns.
Table Users
id
name
email
Table Issues
id
createdby
assignedto
reportedby
In my models I have everything mapped properly I believe.
When I try to update the
2012 Dec 12
1
#8498 postgres_adapter fix for disable_referential_integrity
Please review this patch for postgres adapter''s referential_integrity.rb in
Rails master and 3.2.9 and let me know what you think. We are using it via
an initializer (monkey patching the adapter directly vs. in module):
https://github.com/rails/rails/pull/8498
Fixes this issue also seen by others in Foreigner:
https://github.com/matthuhiggins/foreigner/issues/61
Problem that it
2005 Jun 30
2
"Blanks" in the interface file
Hi all!
I''m using shorewall 2.2.3 and I got a net device that seems to be a
point-to-point device (that''s what ifconfig suggests):
vpnlink Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:aaa.bbb.ccc.ddd P-t-P:aaa.bbb.ccc.ddd Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1300 Metric:1
RX
2004 Dec 23
2
where is Xen''s name from?
hello,
I wonder where the Xen''s name came from? I looked at the Xen FAQ, and
there is no information. That should be there, right ;-)
Merry Christmas to everyone on the list ;-)
AQ
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products
2012 Jun 07
1
noexec tmp directory
Hello,
I am fixing up a system for someone and they did not make a separate
partition for /tmp...but I want to make it noexec, nosuid.
I came across a site that said I could skip all the mount/unmount and
new partition stuff (which would probably include downsizing a lvm to
make room for it)... by adding this in fstab
/tmp /tmp bind nosuid,noexec,bind 0 0
and then reboot...
There is
2006 Jan 09
3
rails ignoring the migration file
I have a mysql database that I am trying to use migrations on. The
problem that I am having is that when I create a blob field in my
migration file like so:
t.column "data", :binary, :limit => 15.megabytes, :null => false
rails changes it to this in the schema:
t.column "data", :binary, :default => "", :null => false
not only is this not what I wanted