Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- class PenyesuaianTableUsers extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::table('users', function (Blueprint $table) {
- $table->string("username")->unique();
- $table->string("roles");
- $table->text("address");
- $table->string("phone");
- $table->string("avatar");
- $table->enum("status", ["ACTIVE", "INACTIVE"]);
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::table('users', function (Blueprint $table) {
- $table->dropColumn("username");
- $table->dropColumn("roles");
- $table->dropColumn("address");
- $table->dropColumn("phone");
- $table->dropColumn("avatar");
- $table->dropColumn("status");
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement