Files
Nexora/database/migrations/2025_04_22_112354_update_projects.php
Javi 356f56eebd
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
first commit
2025-04-23 00:14:33 +06:00

51 lines
1.5 KiB
PHP

<?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::table('projects', function (Blueprint $table) {
$table->string('status')->nullable();
$table->string('project_image_path')->nullable();
$table->string('address')->nullable();
$table->string('province')->nullable();
$table->char('country', 2)->nullable();
$table->string('postal_code', 10)->nullable();
$table->decimal('latitude', 10, 8);
$table->decimal('longitude', 11, 8);
$table->string('icon')->nullable();
$table->date('start_date')->nullable();
$table->date('deadline')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('documents', function (Blueprint $table) {
$table->dropColumn('status');
$table->dropColumn('project_image_path');
$table->dropColumn('address');
$table->dropColumn('province');
$table->dropColumn('country');
$table->dropColumn('postal_code');
$table->dropColumn('latitude');
$table->dropColumn('longitude');
$table->dropColumn('icon');
$table->dropColumn('start_date');
$table->dropColumn('deadline');
});
}
};