mirror of
https://github.com/archtechx/virtualcolumn.git
synced 2025-12-12 19:34:05 +00:00
Add test for generating the column name
This commit is contained in:
parent
43f0b2c30f
commit
c0cd839acc
2 changed files with 71 additions and 0 deletions
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateFooModelsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('foo_models', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
|
||||
$table->string('custom1')->nullable();
|
||||
$table->string('custom2')->nullable();
|
||||
|
||||
$table->json('virtual');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('foo_models');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue