Displaying 20 results from an estimated 3000 matches similar to: "Migration doesn''t seem to preserve create_table options in schema"
2006 Jan 12
1
Best Forum? Was: Migration doesn''t seem to preserve create_table options in schema
Hi,
is this the best forum to answer this question? Is there any better source
for information or another mailinglist to address this question to?
Cheers,
Mariano
---------- Forwarded message ----------
From: Mariano Kamp <mariano.kamp@gmail.com>
Date: Jan 8, 2006 6:24 PM
Subject: Migration doesn''t seem to preserve create_table options in schema
To: rails@lists.rubyonrails.org
2006 Apr 04
0
making a set column type with create_table
create_table(:username, :options => ''ENGINE=MyISAM DEFAULT
CHARSET=utf8'') do |table|
table.column :name, :string
# THE LINE BELOW FAILS
table.column :tag, :set
...
...
end
Hello all,
I''d like to make a set column with the create_table method. I''ve googled
around some, but did not find an answer. Is this possible with
2006 Apr 12
0
create_table and char columns
When I use create_table to make a table :string always makes a varchar
column. How can I make it so that :string will make a char column?
create_table(:accounts, :options => ''ENGINE=MyISAM DEFAULT'') do |table|
# This creates a varchar column, I would like a char column.
table.column :username, :string
...
end
--
Posted via http://www.ruby-forum.com/.
2005 Jul 15
0
Queue_log stats
I'm in search of useful ACD type statistics from the queues. Ie talk
time, ratio's, dropped calls etc.
The flat file queue_log is nice, but more useful would be the data in
Postgres or Mysql. Unfortunately the queue module does not yet
support ODBC DB logging (yet). In the meantime this quick and dirty
hack gets the job done.
Replace the flat file with a unix named pipe.
2006 Mar 29
2
1.1 ruby schema breaks MySQL FULLTEXT index
If you used MySQL FULLTEXT indexes and just upgraded to Rails 1.1, watch
out for this one. Rails 1.1 now defaults to Ruby as your schema format.
So instead of development-structure.sql, Rake will use schema.rb.
That''s portable and good stuff overall but there is a slight
compatibility issue. Ruby schema doesn''t know how to do FULLTEXT index
syntax for MySQL.
To work around it,
2010 Mar 10
0
Postgres plpgsql is created by default in new version, but schema dump tries to create it
As of some recent version of Postgres, plpgsql is created for new
databases by default, but the sql schema export
(config.active_record.schema_format = :sql) expots a create command in
development_structure.sql, resulting in an error.
CREATE PROCEDURAL LANGUAGE plpgsql;
I could not find the version this changed in, however it is noted
here:
2007 Feb 13
1
observe_field and select box
Hi everyone,
I am a newbee in RoR and i could use some help. I have a select box
populated by:
<select name = "test_company" id = "test_company">
<option selected value=test.company.to_s>Create New </option>
<%= options_for_select Company.find(:all,
:conditions => ["name =?", test.company],
:order => "id asc").collect{|c|
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
2009 Apr 09
4
create_table with unique combo
I need to create a table replacing default integer id with a string id
and making a combo of (id and version) unique primary key. Here is
what I''ve got so far.
class CreateCatalogs < ActiveRecord::Migration
def self.up
create_table :catalogs, :id => false do |t|
t.string :id, :limit => 20, :null => false
t.string :version, :default =>
2007 Feb 03
1
Postgres + tsearch2, migrations, and unit testing
I''m sure people have encountered this before, but I''ve been
unsuccessful at finding anything about it.
Basically, I got a rails app that uses postgres and tsearch2 for some
full text indexing and I''d like to be performing unit tests. Now,
there''s the whole deal of how to get the test database to load all the
tsearch2 information properly.
I tried to come up
2008 Apr 15
1
Dovecot LDA / Deliver question
Problem described:
I am trying to get Postfix + Dovecot + MySQL setup to work together in a
virtual mail hosting platform. I am running Postfix 2.3.x, and MySQL 5.0.x.
I am trying to use Dovecot's LDA for delivery to the users vmail home
directory -- usually under /var/vmail/domain.com/j/jdoe for home and
/var/vmail/domain.com/j/jdoe/.maildir for mail location, using MAILDIR
format.
2006 Jul 16
2
how to specify a hash in a migration create_table.
I want to have a column in my model that needs to store variable information
in a structured manner. For example,:
Equipment type computer:
ram: 512-mb
os: PuppyLinux 2.0.1
Equipment type router:
manufacturer: LinkSys
ports: 4
wireless: yes
I would have customized view ( RJS ) that would prompt the user for the
correct information based on the EquipmentType selected. The info
2005 Dec 23
2
no need for DB reflection when using config.active_record.schema_format = :ruby ?
Hi.
I''ve not seen anything on this so thought I''d put forward the idea and
see if it has any merit, or is already in practice.
When using migrations with config.active_record.schema_format = :ruby
(ruby as the canonical DB definition) it seems there would be no need
to query the database itself to determine its structure; it would
already be known.
This might have some good
2006 Apr 03
2
problems testing on 1.1 and postgresql
Hi,
I get errors doing this:
1) createdb myapp_test
2) rake db:test:clone_structure
3) rake test:units
rake aborted!
PGError: ERROR: relation "matches" already exists
I''m using the :sql schema format because there are some problems with
postgres and the :ruby schema format
config.active_record.schema_format = :sql
It seems rake test:units is trying to create the tables
2006 Jan 30
2
Rake and NOT using schema.rb for clone_structure_to_test
Is there a way to specify not not use schema.rb but instead using a
native sql file to clone structure to the test db? Schema.rb doesn''t
really work that well for mediumblobs ... Thanks.
--
Posted via http://www.ruby-forum.com/.
2008 Oct 08
5
schema.dump chokes on RAW type
I haven''t seen anyone mention this yet.
The tail end of the migration process is a call to schema.dump. Our
primary keys are uuids and these choke schema.dump on both oracle and
postgres. The latter fails silently (skips three tables) while the
former complains about the RAW(16) in each of the three tables.
Anyone had a similar experience?
--
Posted via http://www.ruby-forum.com/.
2006 Jul 14
2
db:migrate question
Hi,
In my environment.rb, I have set:
config.active_record.schema_format = :ruby
Whenever I do a rake db:migrate, both db/development_structure.sql and
db/schema.rb get generated. This shouldn''t happen should it? I thought
I should only get db/schema.rb?
Thanks,
Jordan
2006 Dec 20
1
Problem with Oracle function-based indexes in Rails
Hello,
We''re using Rails on an Oracle database. If we define an index like the
following, we end up with problems during the "db:schema:dump" rake target.
add_index "emcolumn", ["upper(name)"], :name => "ind_emcolumn_uname"
The created schema.rb file contains:
add_index "emcolumn", ["sys_nc00013$"], :name =>
2005 Dec 25
3
SQLite primary key schema
So after successfully getting the test SQLite db to run from memory, I
tried running some tests but found that somewhere in the schema
translation from Postgres (my devel database) and SQLite Rails fails
to properly set the ''id'' column, which breaks all kinds of things.
Take as an example my ''users'' table. In Postgres the schema is
(generated with pgAdmin III):
2006 Jul 12
1
Dumping schema
All,
It looks like rake db:schema:dump does not dump primary keys.
I have some legacy table that don''t follow the convention ie pk = id
and
none of the primary keys for these tables are getting dumped...
Seems strange as this should be readily available from the db. I am
using
MySQL. Is anybody else seeing that ?
Incidentally how does one specify a primary key using