<commit_before><?php

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

class TeamworkSetupTables extends Migration
{

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table( \Config::get( 'teamwork.users_table' ), function ( Blueprint $table )
        {
            $table->integer( 'current_team_id' )->unsigned()->nullable();
        } );


        Schema::create( \Config::get( 'teamwork.teams_table' ), function ( $table )
        {
            $table->increments( 'id' )->unsigned();
            $table->integer( 'owner_id' )->unsigned()->nullable();
            $table->string( 'name' );
            $table->timestamps();
        } );

        Schema::create( \Config::get( 'teamwork.team_user_table' ), function ( $table )
        {
            $table->integer( 'user_id' )->unsigned();
            $table->integer( 'team_id' )->unsigned();
            $table->timestamps();

            $table->foreign( 'user_id' )
                ->references( \Config::get( 'teamwork.user_foreign_key' ) )
                ->on( \Config::get( 'teamwork.users_table' ) )
                ->onUpdate( 'cascade' )
                ->onDelete( 'cascade' );

            $table->foreign( 'team_id' )
                ->references( 'id' )
                ->on( \Config::get( 'teamwork.teams_table' ) )
                ->onDelete( 'cascade' );
        } );

        Schema::create( \Config::get( 'teamwork.team_invites_table' ), function(Blueprint $table)
        {
            $table->increments('id');
            $table->integer('user_id')->unsigned();
            $table->integer('team_id')->unsigned();
            $table->enum('type', ['invite', 'request']);
            $table->string('email');
            $table->string('accept_token');
            $table->string('deny_token');
            $table->timestamps();<commit_msg>Add typehint to migration<commit_after><?php

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

class TeamworkSetupTables extends Migration
{

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table( \Config::get( 'teamwork.users_table' ), function ( Blueprint $table )
        {
            $table->integer( 'current_team_id' )->unsigned()->nullable();
        } );


        Schema::create( \Config::get( 'teamwork.teams_table' ), function ( Blueprint $table )
        {
            $table->increments( 'id' )->unsigned();
            $table->integer( 'owner_id' )->unsigned()->nullable();
            $table->string( 'name' );
            $table->timestamps();
        } );

        Schema::create( \Config::get( 'teamwork.team_user_table' ), function ( Blueprint $table )
        {
            $table->integer( 'user_id' )->unsigned();
            $table->integer( 'team_id' )->unsigned();
            $table->timestamps();

            $table->foreign( 'user_id' )
                ->references( \Config::get( 'teamwork.user_foreign_key' ) )
                ->on( \Config::get( 'teamwork.users_table' ) )
                ->onUpdate( 'cascade' )
                ->onDelete( 'cascade' );

            $table->foreign( 'team_id' )
                ->references( 'id' )
                ->on( \Config::get( 'teamwork.teams_table' ) )
                ->onDelete( 'cascade' );
        } );

        Schema::create( \Config::get( 'teamwork.team_invites_table' ), function(Blueprint $table)
        {
            $table->increments('id');
            $table->integer('user_id')->unsigned();
            $table->integer('team_id')->unsigned();
            $table->enum('type', ['invite', 'request']);
            $table->string('email');
            $table->string('accept_token');
            $table->string('deny_token');
            $table->timestamps();
{'fraction_non_alphanumeric': 0.17628865979381445, 'fraction_numerical': 0.0, 'mean_word_length': 2.013198757763975, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 71, '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': '7246455', 'n_tokens_mistral': 1147, 'n_tokens_neox': 1124, 'n_words': 180}