Initial commit

This commit is contained in:
Chris Smith
2025-02-19 14:51:16 +01:00
commit d82a6cad96
198 changed files with 13819 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<?php
use yii\db\Migration;
/**
* Handles the creation of table `{{%meal}}`.
*/
class m250219_133939_create_meal_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable('{{%meal}}', [
'id' => $this->primaryKey(),
'file_name' => $this->string()->notNull(),
'calories' => $this->integer()->notNull(),
'protein' => $this->integer()->notNull(),
'fat' => $this->integer()->notNull(),
'carbohydrates' => $this->integer()->notNull(),
'fiber' => $this->integer()->notNull(),
'meal' => $this->integer()->notNull(),
'created_at' => $this->integer()->notNull(),
'updated_at' => $this->integer()->notNull(),
]);
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
$this->dropTable('{{%meal}}');
}
}