Comments (7)
It's very well established that db:schema:load is the way to go and that you should check in your schema.rb file. Right now, db:migrate breaks for me because a model that was used in a migration has been removed, which is completely legitimate, as opposed to not checking in your schema, which is just sloppy. I say support and encourage the correct behavior, rather than account for deviations from the accepted standard. But whatever works.
from cruisecontrol.rb.
reposting prior recomment as myself ;)
"db:schema:load will break if you don't check in schema.rb (which not everyone does). Maybe db:schema:load, with a fallback to migrate if schema.rb doesn't exist?"
from cruisecontrol.rb.
I would say that it is just sloppy to use your app's ActiveRecord Model classes in your migrations, which may go away, as you pointed out. If you must use an ActiveRecord model, declare a new minimal one in-line in the migration, so that the migration will never break even if you delete the table's corresponding model class from your app.
But I digress. I think the point is we should support both approaches...
from cruisecontrol.rb.
Touche. ;)
from cruisecontrol.rb.
+1 on db:schema:load
from cruisecontrol.rb.
The right thing to do if you need to use an ActiveRecord::Base model in your migrations is to re-declare it locally. If the code is checked in and part of your app then it should run; if it doesn't run, it should be fixed or compressed and removed. This is technical debt. If your migrations don't run anymore, then what are they still doing in your db/migrate folder?
I don't want to switch it over unilaterally since that will affect a lot of other people's builds. If anyone would like to submit a patch to make migrate/schema:load configurable I think that would be nice. If not, I'll place it in the backlog as a feature.
from cruisecontrol.rb.
The idea of trying to do the right thing based on the presence of schema.rb sounds good to me, but if you've been using db:migrate and don't check it in then won't you already have (an incorrect) one locally?
from cruisecontrol.rb.
Related Issues (20)
- builder exits, cruise process still up HOT 1
- Change default git branch HOT 4
- Builder doesn't understand parameterized rake tasks HOT 1
- Email notification sent when test is still running HOT 2
- site_config.rb seems to be ignored HOT 2
- Nil error with empty commit messages HOT 1
- Download links broken, there's nowhere to download the project from anymore. HOT 4
- Wildcards in branch name for testing feature branches HOT 3
- Todo HOT 10
- test errors introduced by a merge
- Not work send emails after cruise update to latest version
- Is this project still active? HOT 4
- Looks like link to docs is broken HOT 4
- Code browser route unreachable
- Allow "Build Now" when disable_admin_ui is enabled HOT 3
- Builder exits unexpectedly HOT 2
- Upgrade to Rails 3.2.x HOT 7
- Test fails but build passes HOT 1
- Cruisecontrol.rb on top of Amazon EC2
- Running cruise add --help starts builders for existing projects
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cruisecontrol.rb.