changes
This commit is contained in:
@ -0,0 +1,28 @@
|
||||
<?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('news', function (Blueprint $table) {
|
||||
$table->unsignedInteger('views_count')->nullable()->after('image_source');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('news', function (Blueprint $table) {
|
||||
$table->dropColumn('views_count');
|
||||
});
|
||||
}
|
||||
};
|
@ -0,0 +1,28 @@
|
||||
<?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('advertisements', function (Blueprint $table) {
|
||||
$table->date('valid_till')->nullable()->after('parent_advertisement');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('advertisements', function (Blueprint $table) {
|
||||
$table->dropColumn('valid_till');
|
||||
});
|
||||
}
|
||||
};
|
36
database/migrations/2024_06_21_044940_create_popup_table.php
Normal file
36
database/migrations/2024_06_21_044940_create_popup_table.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?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('popups', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('title')->nullable();
|
||||
$table->string('description')->nullable();
|
||||
$table->string('image')->nullable();
|
||||
$table->date('valid_till')->nullable();
|
||||
$table->string('link')->nullable();
|
||||
$table->integer('status')->nullable();
|
||||
$table->integer('display_order')->nullable();
|
||||
$table->integer('createdBy')->nullable();
|
||||
$table->integer('updatedBy')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('popups');
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user