You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
647 B

  1. <?php
  2. use Movim\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. class CreateInvitesTable extends Migration
  5. {
  6. public function up()
  7. {
  8. $this->schema->create('invites', function (Blueprint $table) {
  9. $table->string('code', 8);
  10. $table->string('user_id', 64);
  11. $table->string('resource', 128);
  12. $table->timestamps();
  13. $table->primary('code');
  14. $table->foreign('user_id')
  15. ->references('id')->on('users')
  16. ->onDelete('cascade');
  17. });
  18. }
  19. public function down()
  20. {
  21. $this->schema->drop('invites');
  22. }
  23. }