12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- return new class extends Migration
- {
- /**
- * Run the migrations.
- */
- public function up(): void
- {
- Schema::create('projects', function (Blueprint $table) {
- $table->id();
- $table->string('name', 150);
- $table->integer("company_id");
- $table->string('code', 50);
- $table->decimal('const', 10, 2)->nullable();
- $table->integer('available_days')->default(0);
- $table->string("status", 20)->default("undone")->comment("undone, pending_review, suspended, closed");
- $table->date("begin")->nullable();
- $table->date("end")->nullable();
- $table->decimal('latitude', 10, 6)->nullable();
- $table->decimal('longitude', 10, 6)->nullable();
- $table->string("type", 20)->nullable();
- $table->enum('acl', ['private', 'custom'])->default('private');
- $table->string("whitelist")->nullable();
- $table->text("description")->nullable();
- $table->integer("created_by");
- $table->softDeletes();
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- */
- public function down(): void
- {
- Schema::dropIfExists('projects');
- }
- };
|