Last active
May 4, 2016 03:36
-
-
Save lira92/c1057ba49dd70755896744af62137899 to your computer and use it in GitHub Desktop.
Arquivo de Migration
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
<?php | |
use Phinx\Migration\AbstractMigration; | |
class PrimeiraMigration extends AbstractMigration | |
{ | |
/** | |
* Change Method. | |
* | |
* Write your reversible migrations using this method. | |
* | |
* More information on writing migrations is available here: | |
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class | |
* | |
* The following commands can be used in this method and Phinx will | |
* automatically reverse them when rolling back: | |
* | |
* createTable | |
* renameTable | |
* addColumn | |
* renameColumn | |
* addIndex | |
* addForeignKey | |
* | |
* Remember to call "create()" or "update()" and NOT "save()" when working | |
* with the Table class. | |
*/ | |
public function change() | |
{ | |
$table = $this->table('Usuarios'); | |
$table->addColumn('nome', 'string') | |
->addColumn('senha', 'string') | |
->create(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment