Rails schema not updating
These are basically managed rake tasks, but occasionally folks weren’t sure what had been run by whom and when.While this worked OK, we thought we could do better.Over time the team has built up processes related to making database changes to our application.These policies help us avoid some off the pitfalls, while encouraging good communication.
As you work with a growing team and codebase, occasionally database changes will cause some surprises and issues during deploys.
When creating a new migration, at minimum you need to supply a descriptive name for the migration in Camel Case or underscore text, and the generator does the rest.
This is how the command looks like Note that if you change the classname of your migration to something that doesn’t match its filename, you will get an uninitialized constant error when that migration gets executed.
A primary key column called id will also be added, as it's the default primary key for all Active Record models.
The timestamps macro adds two columns, created_at and updated_at.