2020-10-27 01:49:52 +01:00
|
|
|
<?php namespace Aweos\Resizer\Updates;
|
|
|
|
|
|
|
|
use Schema;
|
|
|
|
use October\Rain\Database\Schema\Blueprint;
|
|
|
|
use October\Rain\Database\Updates\Migration;
|
|
|
|
|
|
|
|
class CreateResponsiveFilesTable extends Migration
|
|
|
|
{
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
Schema::create('responsive_source_files', function(Blueprint $table) {
|
|
|
|
$table->engine = 'InnoDB';
|
|
|
|
$table->increments('id');
|
|
|
|
$table->string('basename');
|
|
|
|
$table->string('slug');
|
|
|
|
$table->string('extension');
|
|
|
|
$table->json('tags');
|
2020-10-27 02:18:30 +01:00
|
|
|
$table->string('aspect_ratio')->nullable();
|
2020-10-27 01:49:52 +01:00
|
|
|
$table->timestamps();
|
|
|
|
});
|
|
|
|
|
|
|
|
Schema::create('responsive_attachments', function(Blueprint $table) {
|
|
|
|
$table->engine = 'InnoDB';
|
|
|
|
$table->increments('id');
|
|
|
|
$table->integer('file_id')->unsigned();
|
|
|
|
$table->string('title');
|
|
|
|
$table->string('slug');
|
|
|
|
$table->string('description')->nullable();
|
|
|
|
$table->timestamps();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('aweos_resizer_settings');
|
|
|
|
}
|
|
|
|
}
|