similar to: Migrations for initial schema: Where to put initial data?

Displaying 20 results from an estimated 7000 matches similar to: "Migrations for initial schema: Where to put initial data?"

2006 Apr 11
2
Schema.rb and MySQL decimal
Hi, I have a mysql schema with some decimal(20,20) fields. Now, I made a rake db_schema_dump for deployment of my applications on other machines. Rails created a schema.rb with the decimal fields as float. After a rake db_schema_import the fields are just float not decimal. How can I force rails to create decimal(20,20) columns instead of float? Thx. Marc -- Posted via
2006 Feb 23
0
Problem with db_schema_import and MySQL timestamp!
Hi, This post concerns a SQL error while I try to import a schema into MySQL with timestamp dates. To reproduce try these commands: mickey@bunny:~/dev/rails/timeonrails$ rake db_schema_dump (in /home/mickey/dev/rails/timeonrails) mickey@bunny:~/dev/rails/timeonrails$ cat db/schema.rb # This file is autogenerated. Instead of editing this file, please use the # migrations feature of ActiveRecord
2006 Jan 30
5
Problems migrating from Postgres to MySQL
Hello everyone, I''m trying to migrate a working app from Postgres to MySQL, and I''m trying to use a migration to get it done rather than alter all my database table creation scripts to MySQL syntax. I''ve done loads of work with Postgres, but am a real newbie with MySQL... I did a ''rake db_schema_dump'' from my Postgres app, and got a nice looking
2005 Dec 22
2
help me understand migrations movie
I''m somewhat of a newbie - played with recent versions of rails a few mths ago, but have decided to start from scratch with 1.0. I want to build my new db as much as possible with migrations, so I watched DHH''s migrations movie from rubyonrails.org. A few things confuse me: 1. He generates the model ("post") before running rake db_schema_dump. Is that necessary or
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
2006 Jan 19
3
Migrating from Mysql to PostgreSQL
I tried to use ''rake db_schema_dump'' from old MySQL database and then use ''rake db_schema_import'' to rebuild the database in PostgreSQL. The issue here is that only some of tables can be imported successfully. For example, in the dumped schema.rb: create_table "profiles", :force => true do |t| t.column "ticker", :string, :limit
2006 May 30
1
rake db_schema_import on vanilla schema.rb
Hi all, I dumped my schema from SQLServer 2000 without any problems. I then tried to "rake db_schema_import" on MySQL 4. To do this i changed my database.yml settings to use the mysql adapter (as it was set to use sqlsever before) and attempted the import. I haven''t changed a thing in the schema.rb script and, even though I do have generated a migration, I think I
2006 Jan 01
11
Migration db_schema_import always fails.
I have not been able to get DB migrations to work at all in Rails 1.0 for me. On multiple platforms I continually get the same errors. It took me awhile to figure out some initial things, such as Migrations don''t seem to support Enum column types, and doesn''t really support Foreign key relationships (the constraints at least). After changing my DB schema to jive more with the
2006 Jan 26
9
Problem with schema_db_import on Site5?
Hello, I am trying to put my rails app on a host .So I presume the method to do this is to first do rake db_schema_dump and then copy it to the host and do rake db_schema_import. I use mySQL Ver 14.7 Distrib 4.1.14, for pc-linux-gnu (i686) using readline 4.3 ** Invoke db_schema_import (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db_schema_import rake
2006 Mar 27
3
Migration commands -- create a SQL Server production DB?
Hallo -- could anyone tell me how I use Migrations (which my existing development schema is implemented with) to create the production database for deployment? The target DB is a SQL Server database -- I don''t know if that''s an issue -- I seem to remember reading that SQL Server is supported now. Oh, yeah -- SQL Server was *not* my choice! But what I seem totally unable to
2006 Jan 19
3
problems with migrations in sql server
Is anyone using migrations with a SQL Server database who might be able to lend me a hand? I''ve used migrations with MySql in the past and haven''t run into any issues so forgive When I run rake migrate nothing is actually getting updated in my database. I created a migration using ./script/generate migration AddFooTable and updated the migration to look as follows: class
2006 Aug 07
2
schema -> migrations
I''ve poked around a bit with Google and I can''t find a way to generate a base set of migrations from a given SQL schema. Is there an easy way to do this? thanks John
2005 Dec 23
1
Better way to import initial migration?
On a rails app that I''m developing I converted a regular old .sql file into a rails migration. Since I generated the migration in my development environment, it created the schema_info table for me. However, when I updated my production environment and tried running rake migrate it complained that schema_info doesn''t exist. Is there a rake task for getting around this yet, or
2006 Jan 19
0
db_schema_dump for SQL Server
We''re using migrations to manage a SQL Server project and have been running into a number of issues with db_schema_dump/migrations. Can anyone confirm that these are actual issues with the SQL Server adapter and not issues with me :) 1) Fields are not properly setup with proper null settings (:null => true / false). I''m wondering if we need to update the def columns method
2006 Feb 15
2
migrations still
I think I am pissing into the wind to make migrations work at this point. Looking at http://wiki.rubyonrails.org/rails/pages/UnderstandingMigrations it appears that the problem that I am having is that postgresql can''t do the drop_table part because of the foreign_key keys (constraints) which requires ''cascade'' as an option to drop some of the tables that have other
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
2005 Dec 18
3
automatically generate migration from db/SQL?
Hi, I''d like to use migrations to build my initial database. Is there a gem or plugin that will generate the migration code for initial db if I point it at a live database or sql file? If yes, then can you automatically generate the incremental migrations as well? Thanks, Jason
2006 May 23
0
rake db_schema_dump failure
Anyone know why "rake db_schema_dump" would produce the following error: rake aborted! Don''t know how to build task ''db_schema_dump'' (See full trace by running task with --trace) Otherwise, my migrations work fine. -- Posted via http://www.ruby-forum.com/.
2006 Jan 11
2
Creating a DB in the schema import process
I''ve got a bunch of table creations in the schema.rb file and all is well. However, I have to manually go and create the db first. Is there a way (something like a create_database method) to get this to work? (execute "create database ..." didn''t seem to cut it either.) _______________________ Brad Eck Sr. Software Engineer Pelco 3500 Pelco Way Clovis, CA 93612
2006 Mar 23
3
migrations: how to have all data dumped into rb ?
Hi, I dumped the schema using rake db_schema_dump. Now how do I create a migration containing all the data I have in my dev db ? -- Jean-Christophe Michel