Using Laravel 5.3 how can I implement partition. Following is the mysql table structure I\'m trying to add in migration.
CREATE TABLE `settings` (
`id` I
I think it is help to you,
Schema::create('settings', function(Blueprint $table) {
$table-> increments('id');
$table->integer('client_id')->primary();
$table->string('key');
$table->text('value');
$table->timestamps();
$table->unique(['client_id', 'key']);
});
or
Schema::create('settings', function(Blueprint $table) {
$table-> increments('id');
$table->integer('client_id');
$table->string('key');
$table->text('value');
$table->timestamps();
$table->primary('client_id');
$table->unique(['client_id', 'key']);
});
I searched everywhere, i can't solution find for partition.
But,
My suggestion use, below unprepared into the migration file functions of up and down function
DB::unprepared()
in migration to run your SQL query with partition.
like,
DB::unprepared('create table....')