similar to: Migrate database to a new one using migrations.

Displaying 20 results from an estimated 1000 matches similar to: "Migrate database to a new one using migrations."

2006 May 24
2
Gallery2 integration
Is anybody working already in a gallery2/rails integration? I need to use it as part of my project, so, before start from scratch with it I''d like to know if already is something out there. Thanks.
2006 Apr 29
2
nuby migration question -- data migration, MySQL => postgresql
How do I best migrate the data? For small databases I can text-edit the dump file from MySQL. The postgresql compatibility switch doesn''t help on mysqldump. Any ideas. Can MySQL export CSV that postgresql can import ? W Fred -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Apr 30
16
postgresql duplicate key violates unique constraint
I have a weird problem with creating a new record when using PostgreSQL. From inside script/console ... >> entity = Entity.new >> entity.first_name = "Foo" >> entity.last_name = "bar" >> entity.save Throws an exception due to the following SQL error: duplicate key violates unique constraint. The application was working fine before and suddenly
2006 Apr 10
1
Add Column After Column in Migrations
Adding a column to a table just places the column at the end, but I like to keep related columns together. Is there a way to specify where the column is added in a table with migrations? For example, in MySQL you can do: ALTER TABLE my_table ADD COLUMN new_column INT AFTER other_column I was hoping migrations would support something like this: add_column :my_table, :new_column, :integer,
2011 Sep 12
0
Migrate column from text to binary (PostgreSQL)
Hello, So I''ve realized one of the columns in a table has to be binary instead of text. However, a straightforward change_column :my_table, :my_column, :binary fails under PostgreSQL (9.x series) The error message being: PGError: ERROR: column "my_column" cannot be cast to type bytea : ALTER TABLE "my_table" ALTER COLUMN "my_column" TYPE bytea Now
2006 May 23
3
ez-where headscratch
Hi there, I''m puzzled by this apparently simple query I can''t manage to reassemble using ez_where plugin. cond = Caboose::EZ::Condition.new :my_table do start_on < Time.now any {end_on > Time.now; end_on.nil?} end I keep getting the following result : >> cond.to_sql => ["my_table.start_on < ? AND (my_table.end_on > ?)", Tue May 23
2009 Oct 01
1
Help me replace a for loop with an "apply" function
...if that is possible My task is to find the longest streak of continuous days a user participated in a game. Instead of writing an sql function, I chose to use the R's rle function, to get the longest streaks and then update my db table with the results. The (attached) dataframe is something like this: day user_id 2008/11/01 2001 2008/11/01 2002 2008/11/01 2003
2006 Aug 10
1
reusing previous code
Hi, I have a couple of controllers, views, models and mailers for a given functionality (for example, user registration). ?what is the best way to share them between multiple applications so that I don''t have to copy them over and over again? Thanks.
2007 Aug 30
1
belongs_to with foreign keys that reference non primary key columns
Hello, I have a situation where the foreign key into a table doesn''t correspond to that table''s primary key: my_table ------------- id (pk) name ... other_table -------------- id (pk) my_table_name (fk references my_table(name)) ... I want to be able to say something like: class OtherTable < ActiveRecord::Base belongs_to :my_table, :foreign_key => { :my_table_name
2006 Mar 12
1
Problem with --partial and rsync algorithm
Hi, I'm running the following command for a remote host backup: /usr/local/bin/rsync -a --delete --delete-excluded -v --timeout=120 -z --no-whole-file -partial --partial-dir .rsync-partial --exclude=/sys/* --exclude=/tmp/* --exclude=/stuff/distfiles/* --exclude=/stuff/sistema/* --exclude=/stuff2/ftp/* --exclude=/stuff2/backup/* --exclude=/home/ftp/* --exclude=/home/gentoo/* --exclude=/mnt/*
2005 May 19
5
[OT] Sqlite2 question
So, under Sqlite2, if I want to update a database''s schema, I have to dump the DB, modify the table''s structure, then go and modify EVERY insert statement. The insert statements look like (from memory): INSERT INTO my_table VALUES (''some_id'', ''some_val'', '''', '''', '''', ''some_other
2006 Jun 08
21
"Rails recipes" vs "Rails cookbook"
Reviews Wanted. I''ve read the tables of contents and haven''t yet made up my mind. Is one book clearly better than the other? Is one clearly full of bugs? Is one so much further ahead that there is no choice? Are they both so incomplete that I should just wait and only cook real food? Do trains still have dining cars? Warren Fred -------------- next part -------------- An
2006 Jun 23
5
create session only for logged-in
i was wondering how a blog db has grown by about 15 mb in a week or two. it turns out its the sessions table.. so ive tried this: class ApplicationController.. session :off end class AccountController session :only, :login end and now, its impossible to login, and nothing ever appears in the session table. is this the right approach? i dont want to weed out the sessions with cron, i just
2006 Feb 21
29
script/console
The agile book says "You can inspect variables, set values, add other breakpoints, and generally have a good time". This is very sweet and totally useless. For example, I want to see the session variable, the cookies variable and so on. These names are unknown. I think I guess that the things that are available depend on where you put the breakpoint() call. I''ve tried a
2005 Dec 15
9
FatWreck.com - New Rails Site
After months of design and development, we''ve launched our second Rails site, http://www.fatwreck.com (assuming your DNS is updated - the pink site is the old one). The site is for legendary punk rock record label, Fat Wreck Chords and it includes a store. The old site was highly trafficked, with millions of page views per month and we expect this one to be also. So far, the server
2006 Jul 18
2
Scaffold a Plural table w/ No Pluralization in environment
Hi guys, I have a situation here. I have my project set to no pluralization due to legacy tables in environment.rb. Now, I have some new tables which I''m starting to pluralize. When I do a generate a scaffold to this new table: script/generate scaffold my_tables table it seems to work out fine for certain sections like http://mysite.com/railsapp/new (which also inserts properly to
2006 Apr 29
4
Wild SQL -- public/500.html -- postgres-pr
Every page of my DEPOT on Postgresql rails app now gets an error from postgres-pr about some wild left-join SQL that has nothing to do with my tables: SQL (0.000000) NameError: undefined local variable or method `errors'' for #<PostgresPR::Connection:0x3b200c0>: SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull FROM pg_attribute a LEFT JOIN
2006 Jan 12
4
Domain Registration -- Private ?
The domain registration companies are pushing an add-on called ''Private Registration'' where they keep your email and other personal info secret to prevent spam. Is this a good deal? Is it needed? Do you have it? Do you wish you did? Warren -------------- next part -------------- An HTML attachment was scrubbed... URL:
2009 Jul 20
2
moving columns on a stripchart closer together
Greetings I have a very simple question that I have not been able to solve by reading the manual. When I produce a stripchart with two straight columns of dots representing individual observations, one representing one group of subjects and the other representing another, the columns wind up at the far left and far right sides of the plot, and I'd like them to be closer together, about as far
2006 May 11
7
current user''s id?
I''m new to rails and have a question that seems simple but that I cannot resolve. Is there a way to find the id of the currently logged in user? Thanks, JP -- Posted via http://www.ruby-forum.com/.