Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. <?php
  2.  
  3. use Illuminate\Database\Migrations\Migration;
  4. use Illuminate\Database\Schema\Blueprint;
  5. use Illuminate\Support\Facades\Schema;
  6.  
  7. class PenyesuaianTableUsers extends Migration
  8. {
  9. /**
  10. * Run the migrations.
  11. *
  12. * @return void
  13. */
  14. public function up()
  15. {
  16. Schema::table('users', function (Blueprint $table) {
  17. $table->string("username")->unique();
  18. $table->string("roles");
  19. $table->text("address");
  20. $table->string("phone");
  21. $table->string("avatar");
  22. $table->enum("status", ["ACTIVE", "INACTIVE"]);
  23. });
  24. }
  25.  
  26. /**
  27. * Reverse the migrations.
  28. *
  29. * @return void
  30. */
  31. public function down()
  32. {
  33. Schema::table('users', function (Blueprint $table) {
  34. $table->dropColumn("username");
  35. $table->dropColumn("roles");
  36. $table->dropColumn("address");
  37. $table->dropColumn("phone");
  38. $table->dropColumn("avatar");
  39. $table->dropColumn("status");
  40. });
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement