Open Journal Systems  3.3.0
NotesMigration.inc.php
1 <?php
2 
14 use Illuminate\Database\Migrations\Migration;
15 use Illuminate\Database\Schema\Builder;
16 use Illuminate\Database\Schema\Blueprint;
17 use Illuminate\Database\Capsule\Manager as Capsule;
18 
19 class NotesMigration extends Migration {
24  public function up() {
25  Capsule::schema()->create('notes', function (Blueprint $table) {
26  $table->bigInteger('note_id')->autoIncrement();
27  $table->bigInteger('assoc_type');
28  $table->bigInteger('assoc_id');
29  $table->bigInteger('user_id');
30  $table->datetime('date_created');
31  $table->datetime('date_modified')->nullable();
32  $table->string('title', 255)->nullable();
33  $table->text('contents')->nullable();
34  $table->index(['assoc_type', 'assoc_id'], 'notes_assoc');
35  });
36  }
37 
42  public function down() {
43  Capsule::schema()->drop('notes');
44  }
45 }
NotesMigration
Describe database table structures.
Definition: NotesMigration.inc.php:19
NotesMigration\up
up()
Definition: NotesMigration.inc.php:24
NotesMigration\down
down()
Definition: NotesMigration.inc.php:42