schema.rb Questions

2

Solved

If using the this option in config/application.rb: config.active_record.schema_format = :sql then when you do: rake db:migrate it only dumps the db/structure.sql. I know it isn't using the db...
Federicofedirko asked 30/11, 2012 at 14:8

9

Solved

I don't want to add schema.rb to .gitignore, because I want to be able to load a new database schema from that file. However, keeping it checked in is causing all sorts of spurious conflicts that a...
Kerman asked 10/4, 2009 at 14:48

2

Solved

Working on a Rails 5 app, I want to use structure.sql instead of schema.rb (we're using PostGIS with lots of custom SQL calls...). In config/initializers/database_options.rb I have the following: ...
Rhotacism asked 28/12, 2016 at 20:10

2

I deleted my Schema.rb by mistake (sort of) and I can't seem to be able to regenerate it into db/ by using rake db:dump, I don't really know what to do at this point. Some suggested rake db:dump:a...
Fiber asked 28/2, 2016 at 23:31

3

Solved

Currently I'm working with a huge rails application and multiple branches with each a new feature for this application. It happens a lot a feature will require migrations, which shouldn't be a prob...
Omnidirectional asked 8/5, 2013 at 7:8

7

Solved

I'm trying to add an extra field to one of my tables. I've added the field in the migration file (under db\migrate), then ran 'rake db:migrate' which ran without troubles. My text editor even told...
Piliform asked 13/9, 2009 at 1:21

1

Solved

I am using Rails 3.0.5. I am using MySQL as a database storage. I have a model in which one of the columns needs to be BIGINT. I am using the following in my create migration file: t.column :my_co...
Ex asked 16/3, 2011 at 8:49

3

It's possible to replace db/migrate/* with the contents of db/schema.rb, so that you only have one migration step. Do any of you ever do this? Why?
Bascomb asked 15/12, 2009 at 20:2
1

© 2022 - 2024 — McMap. All rights reserved.