Displaying 7 results from an estimated 7 matches for "create_versioned_tables".
Did you mean:
create_versioned_table
2007 Mar 25
1
Can't use models in migrations
Hi there,
This always used to work for me... but not now. I want to blame Rails
1.2 but I''m sure its not.
I can''t use AR models in my migrations. To make sure its not just my
dodgy code I tried to do the same with a well known plugin..
acts_as_versioned.
A migration such as the one below (taken from acts_as_versioned) is
giving the error
undefined method
2006 Mar 20
3
help: acts_as_versioned setup error "undefined local variable or method ''base_class''"
Hi All,
Rails newbie here trying to set up acts_as_versioned according to Chapter 14
in the Rails Recipies book. I''ve taken the following steps (nearly
verbatim) as mentioned by the book:
- created the target model "Post"
- added the "acts_as_versioned" label to the model file
- generated a migration file
- added the table creation code and the command
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
2006 Feb 14
10
acts_as_versioned and getting authors
Hey guys and gals,
I have the following object that has acts_as_versioned:
class Note < ActiveRecord::Base
acts_as_versioned
belongs_to :user
end
The schema for my notes table is as follows:
create_table :notes, :force => true do |t|
t.column :id, :integer
t.column :noteshare_id, :integer
t.column :user_id, :integer
t.column :title, :string
2006 May 06
0
Issues using GUID plugin: IDs and acts_as_versioned
...the ID with string
quotations. I get an error like:
Mysql::Error: Unknown column ''ayMi4o3iyr2OYfabBlKsEs'' in ''where clause'':
SELECT * FROM littles WHERE (big_id = ayMi4o3iyr2OYfabBlKsEs) ORDER BY
position DESC LIMIT 1
ISSUE #2) acts_as_versioned method "create_versioned_tables" assumes integer
for the foreign key id of the table to be versioned
Example: (using the same class as above) It will generate a "big_versions"
table with:
- id int (this is fine)
- big_id int (this should be a string since tables "bigs" has an ID that is
a string)
Quest...
2006 Aug 13
3
+ migrations in camping
Camping apps are supposed to be little independent apps, often contained in a
single file, which create the database tables and manage them without hassle.
These days it''s common to see in a Camping app:
module Tepee::Models
def self.schema(&block)
@@schema = block if block_given?
@@schema
end
end
Tepee::Models.schema do
create_table :tepee_pages,
2006 May 17
0
acts_as_versioned with lock_version bug?
Hello.
The acts_as_versioned plugin works fine ... till the adjunction
of optimistic locking via the lock_version table column.
Here is the problem description:
Without optimistic locking things are fine:
# ++++ The table creation migration ++++
% cat db/migrate/001_create_tables.rb
class CreateTables < ActiveRecord::Migration
def self.up
create_table :softwares,