similar to: Rails 2.0.2 MySQL 'year' datatype missing from ActiveRecord?

Displaying 20 results from an estimated 6000 matches similar to: "Rails 2.0.2 MySQL 'year' datatype missing from 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
2006 Aug 02
2
mangle ActiveRecord
Dear Gurus on Rails! How do I change the behaviour of one method in ActiveRecord::ConnectionAdapters::SchemaStatements ? Full story: I''d like to mangle ActiveRecord::ConnectionAdapters::SchemaStatements so when it creates a new sql table, it also (optionally) creates my created_at, deleted, key_id, session_id etc columns that I use on basically all tables. It would not be DRY to repeat
2008 Nov 03
17
SQL queries in Rails
Hi... I want to know the equivalent instructions to insert, update, search and delete a registry. I know Rails can do it easily Thanks to ActiveRecord, but here''s the catch: I''m using PostgreSQL. As I''m using SQL to do the migration (Including the foreign keys), I need to know if I can use SQL queries to do those actions. Is there an example out there? I uncommented
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 Aug 19
7
Impossible to get stable?
I have concluded that it is impossible to get this background process stable. I am out of ideas and could really use some help. Here is what I have: 50 workers, just running an infinite loop that constantly calls save! on a model. Keep in mind this is just for testing purposes. I catch all exceptions and put them in the log. I am tried setting allow_concurrency to true and false. Neither
2008 Dec 05
1
ActiveRecord Oracle and nvarchar2 or nclob datatype
Hi, I ve got oracle database which exists prior to my rails app... :-( I ve got trouble when I am updating/inserting records of a table which includes nvarchar2 attributes. These have a specific maximum length. I often get an error Value too long for column when doing my inserts/ updates, but in fact that is not the case. I ve taken a look at the generated sql statements.... As far as I know
2006 Jan 13
19
Problems with scaffold''s parameter on Oracle
Hi I run Ruby on Rails on Oracle XE. I have a simple table: create table customer(id number primary key, name varchar2(100)); And ruby script\generate model Customer ruby script\generate controller Customer http://localhost:3000/customer/ - show a fine list, but when I click show/edit/destroy, I get an ORA-01722: OCIError: ORA-01722: invalid number: select * from (select raw_sql_.*,
2010 Dec 15
2
Error reverse engineering MySQL with RMRE
Hi I am been trying in vain to auto-gen models by reverse-engineering mysql using RMRE. It complains mysql2 gem missing but as seen in my Rails environment below, it is there. Here''s my Rails environment and RMRE error. Experts... please help! Thanks a ton in advance!! === Ruby version 1.9.2 (x86_64-linux) RubyGems version 1.3.7 Rack version 1.2 Rails version 3.0.3 Active Record
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
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
2012 Mar 02
2
Change DB data type and limited decimals
Rails3.1.3 I have db type, startp:integer I need to change it to float. More specifically, 1.2, 45.1, 143.8 ... I have two questions: 1. Is removing and adding the field through migration the only way? in other words, is there a single command to change the type? 2. Is there anyway to limit the decimal place to only one? 56.3, 34.2... are acceptable, but 23.112, 77.34, ... are
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
2012 Dec 12
2
[LLVMdev] donot support uint datatype?
hi guys, i use clang to compile a program with datatype uint, but i get errors saying " use of undeclared identifier 'uint'; did you mean 'int'? ". it really doesn't support it? if true, how can i add a datatype? -- View this message in context: http://llvm.1065342.n5.nabble.com/donot-support-uint-datatype-tp52523.html Sent from the LLVM - Dev mailing list archive
2006 May 22
3
Using the MySQL SET datatype
Does anyone have any links to example code showing how to use the MySQL SET datatype in my ActiveRecord objects. -- Posted via http://www.ruby-forum.com/.
2017 Nov 01
2
Memory address of character datatype
Hi, ? To get the memory address of where the value of variable "x" (of datatype "numeric") is stored one does the following in R (in 32 bit): ? ??? ? library(pryr) ? ?? ?x <- 1024 ?? ?? addr <- as.numeric(address(x)) +?24?? ?# 24 is needed to jump the variable info and point to the data itself (i.e. 1024) ? The question now is what is the value of the jump?so that one
2006 Jun 02
5
ActiveRecord: Getting table names
How do i get (discover) all the table names within a database using ROR/ActiveRecord ? I wish to build a webapp that connects to a database on the fly, discovers tables and column names etc and then can show data or build a report based on user selection. The ActiveRecord API doesnt seem to give any method for getting table names. -- Posted via http://www.ruby-forum.com/.
2007 Sep 03
0
Change the datatype of an attribute?
Hey everyone I''m building an application that is using a mySQL SET datatype sad The problem is that ActiveRecord thinks this is a date! Here''s the relevant output from Model.columns: #<ActiveRecord::ConnectionAdapters::MysqlColumn:0x351b488 @primary=false, @scale=nil, @sql_type="set(''Any'',''Grade School'',''High
2012 Dec 12
0
[LLVMdev] donot support uint datatype?
Hi Chen, On Tue, Dec 11, 2012 at 04:37:20PM -0800, Dong Chen wrote: > hi guys, > i use clang to compile a program with datatype uint, but i get errors saying > " use of undeclared identifier 'uint'; did you mean 'int'? ". > > it really doesn't support it? if true, how can i add a datatype? clang related question should go to cfe-dev at cs.uiuc.edu
2007 Aug 03
2
my number column returns boolean values
Hi everyone, I''m working on a new rails project and have to build it on top of a legacy oracle database. I''m trying to figure out how to get the number value from a NUMBER(1) datatype. So far I''m only getting a "true" value for 1 and "false" for any other number. From the console I can print out my object values and can see that there are number