<commit_before><?php

use yii\db\Migration;

/**
 * Handles the creation for table `{{%chat}}`.
 */
class m161108_115741_create_table_chat extends Migration
{
    /**
     * @inheritdoc
     */
    public function safeUp()
    {
        $this->createTable('{{%chat}}', [

            'id' => $this->primaryKey()->unsigned()->notNull(),
            'receiver' => $this->integer(11)->unsigned()->notNull(),
            'sender' => $this->integer(11)->unsigned()->notNull(),
            'message' => $this->text()->notNull(),
            'status' => $this->integer()->notNull()->defaultValue(1)->comment("0 => Deleted, 1 => Active"),
            'created_at' => $this->datetime()->notNull(),

        ]);
 
        // creates index for column `from_user`
        $this->createIndex(
            'fk-chat-sender-user-id',
            '{{%chat}}',
            'sender'
        );

        // add foreign key for table `wf_user`
        $this->addForeignKey(
            'fk-chat-sender-user-id',
            '{{%chat}}',
            'sender',
            '{{%user}}',
            'id',<commit_msg>changed field name in migrations<commit_after><?php

use yii\db\Migration;

/**
 * Handles the creation for table `{{%chat}}`.
 */
class m161108_115741_create_table_chat extends Migration
{
    /**
     * @inheritdoc
     */
    public function safeUp()
    {
        $this->createTable('{{%chat}}', [

            'id' => $this->primaryKey()->unsigned()->notNull(),
            'receiver' => $this->integer(11)->notNull(),
            'sender' => $this->integer(11)->notNull(),
            'message' => $this->text()->notNull(),
            'status' => $this->integer()->notNull()->defaultValue(1)->comment("0 => Deleted, 1 => Active"),
            'created_at' => $this->datetime()->notNull(),

        ]);
 
        // creates index for column `from_user`
        $this->createIndex(
            'fk-chat-sender-user-id',
            '{{%chat}}',
            'sender'
        );

        // add foreign key for table `wf_user`
        $this->addForeignKey(
            'fk-chat-sender-user-id',
            '{{%chat}}',
            'sender',
            '{{%user}}',
            'id',
{'fraction_non_alphanumeric': 0.20192748967416246, 'fraction_numerical': 0.017439192290041303, 'mean_word_length': 1.9499323410013532, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 57, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5623258', 'n_tokens_mistral': 679, 'n_tokens_neox': 651, 'n_words': 111}