MicroFrameWork/migrations/PostMigration.php
2024-07-25 16:15:18 +03:00

36 lines
813 B
PHP

<?php
namespace migrations;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Capsule\Manager;
class PostMigration extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public static function up(): void
{
Manager::schema()->create('post', function (Blueprint $table) {
$table->increments('id');
$table->string('post', 3000)->nullable(false);
$table->string('username', 255)->nullable(false);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public static function down(): void
{
Manager::schema()->dropIfExists('user');
}
}