<commit_before><?php

use PragmaRX\Support\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateProductsVariantsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function migrateUp()
	{
		Schema::create('products_skus', function(Blueprint $table)
		{
			$table->string('id', 64)->unique()->primary()->index();

			$table->string('sku')->index();

			$table->string('product_id', 64)->index();
			$table->string('color_id')->nullable();
			$table->string('size_id')->nullable();
			$table->decimal('cost', 13, 2)->default(0);
			$table->decimal('price', 13, 2)->default(0);

			$table->timestamps();
		});

		Schema::table('products_skus', function(Blueprint $table)
		{
			$table->foreign('product_id')
					->references('id')
					->on('products')
					->onUpdate('cascade')
					->onDelete('cascade');
		});

		Schema::table('products_skus', function(Blueprint $table)
		{
			$table->foreign('color_id')
				->references('id')
				->on('products_options_values')
				->onUpdate('cascade')
				->onDelete('cascade');
		});

		Schema::table('products_skus', function(Blueprint $table)
		{
			$table->foreign('size_id')
				->references('id')
				->on('products_options_values')
				->onUpdate('cascade')
				->onDelete('cascade');
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function migrateDown()
	{
		Schema::drop('products_skus');
	}
}
<commit_msg>Rename migration<commit_after><?php

use PragmaRX\Support\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateProductsSkusTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function migrateUp()
	{
		Schema::create('products_skus', function(Blueprint $table)
		{
			$table->string('id', 64)->unique()->primary()->index();

			$table->string('sku')->index();

			$table->string('product_id', 64)->index();
			$table->string('color_id')->nullable();
			$table->string('size_id')->nullable();
			$table->decimal('cost', 13, 2)->default(0);
			$table->decimal('price', 13, 2)->default(0);

			$table->timestamps();
		});

		Schema::table('products_skus', function(Blueprint $table)
		{
			$table->foreign('product_id')
					->references('id')
					->on('products')
					->onUpdate('cascade')
					->onDelete('cascade');
		});

		Schema::table('products_skus', function(Blueprint $table)
		{
			$table->foreign('color_id')
				->references('id')
				->on('products_options_values')
				->onUpdate('cascade')
				->onDelete('cascade');
		});

		Schema::table('products_skus', function(Blueprint $table)
		{
			$table->foreign('size_id')
				->references('id')
				->on('products_options_values')
				->onUpdate('cascade')
				->onDelete('cascade');
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function migrateDown()
	{
		Schema::drop('products_skus');
	}
}

{'fraction_non_alphanumeric': 0.20939130434782607, 'fraction_numerical': 0.008347826086956521, 'mean_word_length': 4.117437722419929, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 67, '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': '538596', 'n_tokens_mistral': 1161, 'n_tokens_neox': 956, 'n_words': 135}