Displaying 20 results from an estimated 800 matches similar to: "mangle ActiveRecord"
2009 Sep 28
5
Multi-databases support
Hi,
While I was hacking ovirt-server, I have found that it's currently
restricted to Postgres DB. Even if I like postgres for serious work on a
server, I really prefer to hack/dev locally on a Sqlite or MySQL DB.
I have googled on rails in order to find a good answer for the "foreign
key problem" which forces OVirt to stay on pg. I have found a plugin on
this particular
2008 Feb 26
5
Rails 2.0.2 MySQL 'year' datatype missing from ActiveRecord?
Hi all,
This is my first post to the forum, and I''ll point out right away that
I''m a noob to everything, Ruby, Rails, MySQL, etc., so I expect that I''m
wrong here, but is the ''year'' datatype missing from ActiveRecord in
2.0.2? According to my MySQL 5.0 reference manual, ''year'' is a datatype,
but when I try to run a migration that has
2006 Feb 26
1
Migrations: column option "offset"?
Hi,
On the wiki
http://wiki.rubyonrails.com/rails/pages/UnderstandingMigrations it says:
Valid column options are:
- limit
- offset
- null (i.e. ? :null => false? implies NOT NULL)
- default (to specify default values)
I was wondering what the purpose of the "offset" option is. And after
looking at the API at
2010 Aug 22
1
rails3: t.index in migrations not working anymore
Hello,
I''m playing around with Rails3 and trying to upgrade one of my
applications to Rails 3.0.0.rc and I get an error which should be still
working.
Migration:
t.index :name
When I execute rake:
rake aborted!
An error has occurred, all later migrations canceled:
undefined method `index'' for
#<ActiveRecord::ConnectionAdapters::TableDefinition:0x4b2b6b0>
Does some one
2006 Apr 30
4
Migration, BigInts, and string lengths
Howdy Y''all,
I was thrilled to recently discover migrations, as that framework
addresses a common problem in an elegant way. I have, however, gotten
tripped up a bit as I''ve worked with them.
The first problem I encountered was that, though I was using a BigInt
data type in a field in my dev database, my unit tests were failing
because when I copied the schema from the dev
2006 Apr 19
6
undefined method `create_table'' for #<LoginController:0x5e60
I am geeting the foolowing error.
undefined method `create_table'' for #<LoginController:0x5e60110>
I wrote the crete action in application controller.
I am coping ther total worng please help me!
class ApplicationController < ActionController::Base
model :cart
model :line_item
before_filter :authorize
def create
# create_table() yields a TableDefinition instance
2006 Apr 17
7
MySQL backticks and column names
The upgrade to Rails 1.1 hurt my ability to run tests because it
generated the following MySQL error:
Mysql::Error: You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to
use near ''key ON config (key)'' at line 1: CREATE UNIQUE INDEX key ON
config (key)
I have a table called `config` with a column
2014 Apr 01
3
trouble installing Math::BigInt module
I had to move a perl script from an old server to a new one. Both the
old and new servers are running "CentOS release 5.10 (Final)" and perl
v5.8.8. (But the problem I'm running into appears to be a package
management problem and not a Perl problem which is why I'm posting it to
a CentOS list.)
The line of code in the script that attempts to open a Net::SFTP
connection,
2009 May 27
2
problem with centos upgrade
Dear All,
I have a centos 5 server running my mail and Dns working fine
but when i try to do u yum ugrade or yum update it gives me lots of perl
errors and it terminates
OS is centos 5 (final)
the part of errors reported
---------------------------------
file /usr/lib/perl5/5.8.8/Math/BigFloat.pm from install of
perl-5.8.8-18.el5_3.1 conflicts with file from package
perl-Math-BigInt-1.86-1
2007 Oct 05
3
Do migration support MySQL BIGINT
hi,
just wondering do migration support MySQL BIGINT ?
what if i wanna create a migration with BIGINT ? should i use SQL
directly ?
kiwi
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2006 Apr 25
0
Migrate default now()
I want to set default value to current time of database:
class CreateUsers < ActiveRecord::Migration
def self.up
create_table :users do |t|
# ...
t.column :created_at, :timestamp, :null => false, :default => ''now''
end
end
#...
end
On postgresql, it is converted to:
created_at timestamp NOT NULL DEFAULT ''2006-04-25
2009 Jan 30
5
Yum update conflicts perl-Math-BigInt
I followed the Wiki instructions for setting up *yum-priorities*.
I added the rpmforge repo
I installed clamd without a problem.
Now when I go to update I get conflicts with perl-Math-BigInt.
Is the only solution to uninstall the base version and then install the
rpmforge version?
According the the wiki
"Packages from repositories with a lower priority will never be used to
upgrade
2006 Apr 20
5
Using Migrations to convert join table to join model
Greetings,
I''m trying to convert a HABTM w/attributes join table in my database
into a join model table in order to utilize the new has_many :through
functionality introduced in Rails 1.1. Here''s the current table
definition:
licenses_user_groups: license_id, user_group_id, usage_notes
Perhaps it was a mistake, but I made (license_id, user_group_id) the
primary key.
Now,
2013 Jun 21
1
How to create Migration from Mysql DB with bigint type of Mysql
I have to create Migration file form Mysql DB
But I want type of Migration equivalent with Mysql DB
(example : in Mysql with type Bigint and in Migration will have type
Int(20) or Bigint)
Could You help me solve this Problem?
Thanks
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To
2006 Feb 27
1
Copying many sources to different places inside a destination
Rsync people,
I am preparing to overhaul my Web site's build system, and I am looking
for a convenient way to collect files and directories from various
places on my computer and put them at various locations inside a
destination directory to be posted to my Web site. So far, my script
has been running rsync once for each source, but this is too slow. Is
there a way to get rsync to collect
2010 Aug 08
0
registerable method undefined in Devise migration (was Re: Re: No route matches)
On 8 August 2010 23:39, Abder-Rahman Ali <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:
> I tried to make the application from scratch again, and
> notices that I get the following when I run: $ rake db:migrate
>
> (in /Users/abder/Desktop/Rails/auth)
> == DeviseCreateUsers: migrating
> ==============================================
> -- create_table(:users)
2006 Feb 19
3
multi-sql problem?
hi all,
how to excute multi sql statement in rails
#-------------------------------------------------------
sql_1 = ''drop table if exists test''
sql_2 = ''create temporary table test select * from test_1''
sql_3=''select * from test''
#-------------------------------------------------------
any ideas
all regards
--
Posted via
2007 Sep 27
2
How specify size of string column in a migration
I am new to RoR. How do you specify the size of a string column in a
migration? The examples I''ve see are all of the form:
t.column :name, string
which produces a VARCHAR(255). I want a VARCHAR(40).
Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to
2012 Aug 10
2
postfix mysql quota map to dovecot dict in mysql
currently dovecot dict is
CREATE TABLE IF NOT EXISTS `quota` (
`username` varchar(100) COLLATE latin1_general_ci NOT NULL,
`bytes` bigint(20) NOT NULL DEFAULT '0',
`messages` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
there is not field that says how much quota each user have, so one cant
2005 Jul 04
1
RMySQL typing Problem (bigint unsigned)
Dear Group,
if anyone has experience with the RMySQL Package maybe this behaviour is know:
Reading data from a table into R the fields with datatype bigint(20) unsigned are transformed in some way: e.g. the query "select * from orders where userid = 14929859848712890325" selects the correct case but in R the userid is changed to 14929859848712890368. What happened here? This