Skip to content

Commit

Permalink
Create 2024_09_18_create_announcements_table.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kokofixcomputers authored Oct 13, 2024
1 parent 4c24f48 commit 4d562c9
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions database/migrations/2024_09_18_create_announcements_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAnnouncementsTable extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
Schema::create('announcements', function (Blueprint $table) {
$table->increments('id');
$table->string('text');
$table->integer('mode'); // modes are 0 (success) 1 (info) 2 (danger) 3 (warning)
$table->timestamp('created_at', 0);
});
}

/**
* Reverse the migrations.
*/
public function down()
{
Schema::dropIfExists('announcements');
}
}

0 comments on commit 4d562c9

Please sign in to comment.