mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
editor form
This commit is contained in:
@ -31,6 +31,18 @@ class WikiContentsMigration extends Migration
|
||||
'type' => 'LONGTEXT',
|
||||
'null' => true,
|
||||
],
|
||||
'published_by' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'null' => true,
|
||||
'constraint' => 10,
|
||||
],
|
||||
'last_edit_by' => [
|
||||
'type' => 'INT',
|
||||
'unsigned' => true,
|
||||
'null' => true,
|
||||
'constraint' => 10,
|
||||
],
|
||||
];
|
||||
|
||||
public function up()
|
||||
@ -38,6 +50,11 @@ class WikiContentsMigration extends Migration
|
||||
$this->forge->addField($this->COLUMNS);
|
||||
$currenttime = new RawSql('CURRENT_TIMESTAMP');
|
||||
$this->forge->addField([
|
||||
'published_at' => [
|
||||
'type' => 'TIMESTAMP',
|
||||
'null' => true,
|
||||
],
|
||||
|
||||
'created_at' => [
|
||||
'type' => 'TIMESTAMP',
|
||||
'default' => $currenttime,
|
||||
@ -54,6 +71,8 @@ class WikiContentsMigration extends Migration
|
||||
]);
|
||||
$this->forge->addPrimaryKey('id');
|
||||
$this->forge->addForeignKey('page_id','wiki_pages','id');
|
||||
$this->forge->addForeignKey('published_by','users','id');
|
||||
$this->forge->addForeignKey('last_edit_by','users','id');
|
||||
$this->forge->createTable("wiki_contents");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user