39 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
| <?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');
 | |
|             $table->string('aspect_ratio')->nullable();
 | |
|             $table->integer('min_width')->nullable();
 | |
|             $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');
 | |
|     }
 | |
| }
 |