Просмотр файла app/database/migrations/20161216120524_create_guest_table.php

Размер файла: 791B
  1. <?php
  2.  
  3. use Phinx\Migration\AbstractMigration;
  4.  
  5. class CreateGuestTable extends AbstractMigration
  6. {
  7. /**
  8. * Change Method.
  9. */
  10. public function change()
  11. {
  12. $table = $this->table('guest', ['collation' => 'utf8mb4_unicode_ci']);
  13. $table->addColumn('user', 'string', ['limit' => 20])
  14. ->addColumn('text', 'text', ['null' => true])
  15. ->addColumn('ip', 'string', ['limit' => 15])
  16. ->addColumn('brow', 'string', ['limit' => 25])
  17. ->addColumn('time', 'integer')
  18. ->addColumn('reply', 'text', ['null' => true])
  19. ->addColumn('edit', 'string', ['limit' => 20, 'null' => true])
  20. ->addColumn('edit_time', 'integer', ['default' => 0])
  21. ->addIndex('time')
  22. ->create();
  23. }
  24. }