similar to: models don''t like NOT NULL DEFAULT "" columns

Displaying 20 results from an estimated 30000 matches similar to: "models don''t like NOT NULL DEFAULT "" columns"

2006 Aug 17
8
instance variables in templates
Hey all, Well... hmm... feeling pretty stupid here... For some reason my controller instance variables are not displaying in my templates. I''ve boiled it down to this test case. class Rss::FilmController < ApplicationController def display @time = Time.now end end and the template: <html> <head> <title>Is This Ever Going To Work</title>
2006 Mar 30
15
ActiveRecord 1.13.2 -> 1.14.0 breaks Postgres connectivity
To Whom It May Concern: I have an ActiveRecord-based application (non-Rails). Life was grand until I upgraded ActiveRecord yesterday, after which point I was getting TONNES of these errors from my app and in PostgreSQL''s logs: FATAL: terminating connection due to administrator command According to Google searching, this happens when an external process sends PostgreSQL SIGINT or
2006 Mar 28
8
Rails 1.1: not-null constraint violations
Since upgrading to Rails 1.1, I now get these errors: PGError: ERROR: null value in column "added" violates not-null constraint : INSERT INTO authors ("added", ...) VALUES(NULL, ...) The ''added'' column has a default of current_timestamp, and this used to work fine with Rails 1.0. Are we supposed to put default values in models'' before_create or
2006 Aug 18
4
Default Date storage 0000-00-00?
So I have a database of orders more or less.(it is currently in the process of being upgraded to mysql with a rails fronted, from OLD Paradox database) On one page I made a ''create new order'' system. This allows me to put in the due date and other info. However I wanted to put in the default value of ''0000-00-00'' for the shipped date, as it hasn''t
2005 Dec 23
4
OO model style: inheritance
Hi everybody I am totally new to rails and I am trying to start a tiny project to get familiar with rails. But I already got my first problem and I would be happy if somebody could point me in the best and cleanest direction. I am trying to develop a small gallery app. Since I would like to add more features in future I am trying to design a clean OO architecture of my models: The base object
2005 Dec 15
4
rake migrate ignores '':null => false'' on mysql
I wanted to add a login string column to an existing table => I created a migration : ... def self.up add_column "members", "login" , :string, :null => false end ... remark: it shouldn''t work, as the table is not empty (=> ''login'' would be null in the existing rows.) problem: rake migrate didn''t complain
2006 Apr 13
2
One model won''t work like the others, generating weird error
I''ve been banging my head against this for quite some time and can''t figure out what is going on. I''m doing up a web site based on Typo and adding in some custom controllers. I''m running Typo from trunk, so it''s using the version of rails in vendor/rails. Everything is going smoothly...until now. I have one model that JUST. WON''T. WORK.
2011 May 25
2
[PATCH linux-2.6.18-xen] blkback: don''t call vbd_size() if bd_disk is NULL
...because vbd_size() dereferences bd_disk if bd_part is NULL. Signed-off-by: Laszlo Ersek<lersek@redhat.com> --- drivers/xen/blkback/vbd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -r 415a9b435fef drivers/xen/blkback/vbd.c --- a/drivers/xen/blkback/vbd.c Mon May 23 18:36:33 2011 +0100 +++ b/drivers/xen/blkback/vbd.c Wed May 25 12:15:26 2011 +0200 @@ -73,7 +73,6 @@
2005 Mar 03
12
bug in postgresql ''now'' time handling??
line 212 of postgresql_adapter.rb is return Time.now.to_s if value =~ /^\(''now''::text\)::(date|timestamp)/ i don''t think this will work. in postgresql the field ''now'' is pinned to the SAME TIME for the duration of a transaction. eg. if you do begin transaction; insert into t values(42, ''now''); # sleep one minute
2006 Mar 02
2
[PATCH ] don''t compile HVM_DBG_LOG into xen by default
Don''t compile HVM_DBG_LOG into xen by default. Signed-off-by: Xin Li <xin.b.li@intel.com> Signed-off-by: Jun Nakajima <jun.nakajima@intel.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
2006 Mar 07
1
PLEASE HELP ,a2billing problem with call duration
Regards! During the use of areski a2billing software I'm getting same problem all the time. Actually, after 15 minutes of speaking to someone over calling card, connection brakes. Installation was as smooth as it could be so I don't think I made same kind of a mess in that domain. This is the only problem in the aplication. In the logs everything seems to be fine. I'am sending You
2006 Aug 19
5
Form helpers don''t work with facade columns?
Hello all, I''ve been trying to use a facade column but I notice that the form helpers don''t seem to respect the facade. In the following example I''m trying to story the prices as Integer values but present them to the user as decimals. class Product < ActiveRecord::Base def price=(new_price) write_attribute(:price, Float(new_price)*100) end def price
2006 Aug 04
1
ActiveRecord, Mysql, NULL columns and uniqueness
Hi all. Mysql allows to set multiple NULLs on columns with unique constraint, it''s normal SQL. Well, but when I try to submit some form, all unspecified values will be consodered as '''' (empty string) and (Mysql::Error: Duplicate entry occurs (((. How I can teach ActiveRecord to consider empty fields as NULL?
2006 Jul 13
4
why I don''t like to use some 3rd party plugins
I''m not a professional developer in the sense that I''ve had any formal training or experience. I taught myself programming two years ago and have since moved to ruby and shortly after to rails - even now, i only develop as a hobby. This means that a lot of developer best practises are foreign or unknown to me, that''s why I love rails so much. You learn so much just
2010 May 20
0
RODBC: sqlSave leave primary key and other columns null
I have an existing table, and I am trying to use sqlSave to append additional rows to this database. I omit the primary key, which is a uniqueidentifier type (MS SQL), so that the database can populate that field. However, I get the following error: > sqlSave( ch, result, tablename=thetablename, append=TRUE, rownames=FALSE, colnames=FALSE ) Error in odbcUpdate(channel, query, mydata,
2004 Jul 07
1
X100P don´t answer sometimes
What can I do because my X100P don´t answer sometimes. I put these parameters in the zapata.conf, but sometimes my X100P don´t answer. usedistinctiveringdetection=yes dring1=363,137,0 dring1context=incoming2 Any sugestion? Thank´s --------------------------------- Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! -------------- next part -------------- An HTML attachment
2005 Aug 11
5
Realtime + MYSQL
I'm having a few issues with the MySQL realtime configuration in CVS-HEAD. I tested it initially with realtime extensions (realtime_ext => mysql,asterisk,extensions) and a realtime switch in extensions.conf and that works fine, So I though I'd go back and test a static configuration mapping. I used the table structure from the asterisk guru postgres howto to create something
2006 Jun 21
3
Simple range question
I have a model with a datetime field called start_date. I''d like to do a find on the model so that it returns only records with the start_date equal to the current day. Something like this: @foos = Foo.find(:all, :conditions => //?? start_date equal to today''s date ??// ] ) Thanks in advance for any help. -------------- next part
2006 Sep 23
4
"server" config option (and cmd-line option) don''t do anything for puppetd?
Hi guys, Unlike what it says in the documentation and the --help output, I can''t seem to get puppetd to use the --server setting. The only way I can get puppetd to work is to include a ''puppet'' alias to the ip of the machine I''m running puppetmasterd on in my hosts file. The strange thing though, is that the logs of my puppetmaster show that it *is* getting
2006 Oct 15
3
Migrations - add_column :default=>true, :null=>false
This seems pretty brain dead: add_column :types, :notify_on_create, :boolean, {:default=>true, :null=>false} $ rake migrate Error: ERROR: column "notify_on_create" contains null values : ALTER TABLE types ALTER notify_on_create SET NOT NULL Why doesn''t Rails set the new column to true, as it''s supposed to default to? I tried :default=>1 as well (same