-
-
Save jmarcosJava/7cd9a2e5bb257dcfa7ecccccf5fa1665 to your computer and use it in GitHub Desktop.
Desfazendo coisas no Rails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ rails generate controller Noticias titulo | |
| $ rails destroy controller Noticias titulo | |
| $ rails generate model Noticia titulo:string | |
| $ rails destroy model Noticia | |
| $ rake db:migrate | |
| $ rake db:rollback | |
| $ rake db:migrate VERSION=0 #defaz todas as migrations, deixa o banco "limpo" | |
| $ rake db:migrate:reset #reseta todo o banco, perdendo todos os registros, e já executa novamente as todas as migrations |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment