similar to: on_update current_timestamp in Migrations

Displaying 20 results from an estimated 2000 matches similar to: "on_update current_timestamp in Migrations"

2006 Apr 20
0
Sqlite3 migration and CURRENT_TIMESTAMP
I''m trying out migrations for the first time, and I''m having a problem with my sqlite3 db. A trivial example of what I''m seeing: class InitDb < ActiveRecord::Migration def self.up create_table :mytable, :force => true do |t| t.column :lname, :string t.column :created_at, :string, :default =>
2007 Oct 10
1
how can I use a the current_timestamp feature of a database without a magial column
Hi , I''m looking for a way to create columns with a default current_stamp with the db:migrate feature. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from
2006 May 10
3
migrations :timestamp becomes :datetime in mySql
For some reason whenever I try and create a timestamp column with migrations and mysql I get a datetime column instead. That''s kind of annoying because I want the column to update every time the row gets changed. Is this a bug, or is there something I can do about it? (Obviously I can manually change my mysql table, but that kind of defeats the point of migrations!) In my migration
2006 Feb 28
0
Confusion with counter and single table inheritance
I''m having trouble getting the magical counter to work in a rails app with single table inheritance. following is the relevant code. thank you class declarations class Job < ActiveRecord::Base has_many :vents end class Vent < ActiveRecord::Base belongs_to :job, :counter_cache => true validates_numericality_of :width end class Rectangular < Vent
2006 Apr 05
3
how to insert Current DateTime value into database?
Hi, I want to insert onto database the Current DateTime Value into database field "Store_date" with datatype (DATETIME). How to do tihs? I am usiing hidden variable into my form as follows:- ======================= <%= hidden_field("store", "store_date", :value =>:datetime ) %> ======================= But when I m submmittng form I couldn''t find
2007 Aug 30
2
RoR - Some Questions Before Starting
Hello everyone, For some time I was studying Ruby on Rails, Active Record ideology and other thing related with RoR right now I still know a lot more about PHP than RoR. I am almost ready to start writing websites using RoR and get more experience. But I still have some questions before starting and I can''t start without answers. If you could simply answer some of them, would be great.
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 Jun 21
1
Migration with foreign key won''t work
Hi all I use the plugin which supports foreign keys with migrations: http://wiki.rubyonrails.org/rails/pages/Foreign+Key+Schema+Dumper+Plugin/versions/12 I have created the following migration file: class AddArtistsTable < ActiveRecord::Migration def self.up create_table :artists, :force => true do |t| t.column :name, :string, :limit => 100 t.column :artist_type_id,
2006 Apr 07
6
Magic Field Names - "position"
What does the Magic Field Name position do? I was looking here: http://wiki.rubyonrails.com/rails/pages/MagicFieldNames And unfortunately that documentation is incomplete. Thanks. -- Posted via http://www.ruby-forum.com/.
2006 Apr 14
4
Newbie stuff (.new method)
Hi- Ruby 1.8.2 Rails 1.1 so I''m trying to build my first rails app and I''m trying to understand how the helper methods work. For instance .new & .save . For instance, I''ve created a table of Objects, and generated a scaffold. I see that in the controller, there are calls to Object.new and Object.save. I''m assuming that these are methods inherited
2008 Jan 06
8
ActionController::InvalidAuthenticityToken
Ruby noob here. Just installed Rails 2.0, and am having trouble with updating DB tables, using the ApplicationController. My ApplicationController file looks like: class StoryController < ApplicationController protect_from_forgery :only => [:create, :update, :destroy] scaffold :story #def index #@current_time = Time.now #@story =
2006 Mar 07
0
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
2009 Apr 07
4
/lib daemon folder: how do i add a module into the daemon?
I am using the daemons plugin. I have just one problem how do i add modules from the /lib folder to the /lib/daemons/daemon.rb file eg. /lib/basic_functions.rb this is the file i want to load in daemon.rb contents daemon.rb: #!/usr/bin/env ruby # You might want to change this ENV["RAILS_ENV"] ||= "production" require File.dirname(__FILE__) +
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
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
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
2005 Dec 14
3
Migrations bug with Rails 1.0, PostgreSQL 8.1?
Filed a ticket for bogus Ruby produced via: rake db_schema_dump http://dev.rubyonrails.org/ticket/3232 I''d appreciate it if someone could verify against PostgreSQL 8.0.x -- -- Tom Mornini
2006 Feb 11
2
Migrations and Unintialized Constants Error
I am running into a problem with two of my tables and the "uninitialized constant" error when using migration. I get the "uninitialized constant Note" when running the following code in my migration file: create_table :notes do |t| t.column :id, :integer t.column :noteshare_id, :integer t.column :title, :string t.column :covered, :string
2023 Jun 21
4
[PATCH 01/79] fs: add ctime accessors infrastructure
struct timespec64 has unused bits in the tv_nsec field that can be used for other purposes. In future patches, we're going to change how the inode->i_ctime is accessed in certain inodes in order to make use of them. In order to do that safely though, we'll need to eradicate raw accesses of the inode->i_ctime field from the kernel. Add new accessor functions for the ctime that we can
2007 Jun 27
0
Branch 'as' - libswfdec/swfdec_as_strings.c libswfdec/swfdec_net_stream_as.c libswfdec/swfdec_net_stream.c
libswfdec/swfdec_as_strings.c | 3 + libswfdec/swfdec_net_stream.c | 44 ++++++++++++++++++++++++ libswfdec/swfdec_net_stream_as.c | 70 --------------------------------------- 3 files changed, 47 insertions(+), 70 deletions(-) New commits: diff-tree 281da9b83e68a6d82c61d603b7cc3c735d3e66e9 (from ffe888d4c04af436959d7279bc4e5a8fae6d0acf) Author: Benjamin Otte <otte at