File: /mnt/data/ghayatcom/ghayatcom-api/database/migrations/2022_03_30_161222_alter_pharmacies_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AlterPharmaciesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('pharmacies', function (Blueprint $table) {
$table->string('logo')->nullable()->after('name');
$table->string('registration_number')->nullable()->after('logo');
$table->string('address')->nullable()->after('registration_number');
$table->string('locality_id')->after('address'); //->constrained('cities');
$table->string('post_code')->nullable()->after('locality_id');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('pharmacies', function (Blueprint $table) {
$table->dropColumn('logo');
$table->dropColumn('registration_number');
$table->dropColumn('address');
$table->dropColumn('locality_id');
$table->dropColumn('post_code');
});
}
}