-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Julio Carlos Menendez <9697+juliomenendez@users.noreply.github.com> Co-authored-by: Oliver Kaufmann <oliver.kaufmann@novu.ch> Co-authored-by: Benaja Hunzinger <benhu00@outlook.com> Co-authored-by: Jason Varga <jason@pixelfear.com> Co-authored-by: Maurice Wijnia <maurice@van-ons.nl> Co-authored-by: Frederik Sauer <fritten.keez@gmail.com>
- Loading branch information
1 parent
929ffd0
commit bba3c81
Showing
102 changed files
with
7,430 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
composer.lock | ||
vendor | ||
.phpunit.result.cache | ||
.php_cs.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
database/migrations/create_asset_containers_table.php.stub
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
use Statamic\Eloquent\Database\BaseMigration as Migration; | ||
|
||
return new class extends Migration { | ||
public function up() | ||
{ | ||
Schema::create($this->prefix('asset_containers'), function (Blueprint $table) { | ||
$table->id(); | ||
$table->string('handle')->unique(); | ||
$table->string('title'); | ||
$table->string('disk'); | ||
$table->json('settings')->nullable(); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
public function down() | ||
{ | ||
Schema::dropIfExists($this->prefix('asset_containers')); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
use Statamic\Eloquent\Database\BaseMigration as Migration; | ||
|
||
return new class extends Migration { | ||
public function up() | ||
{ | ||
Schema::create($this->prefix('assets_meta'), function (Blueprint $table) { | ||
$table->id(); | ||
$table->string('handle')->index(); | ||
$table->json('data')->nullable(); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
|
||
public function down() | ||
{ | ||
Schema::dropIfExists($this->prefix('assets_meta')); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Carbon; | ||
use Illuminate\Support\Facades\Schema; | ||
use Statamic\Eloquent\Database\BaseMigration as Migration; | ||
|
||
return new class extends Migration { | ||
public function up() | ||
{ | ||
Schema::create($this->prefix('blueprints'), function (Blueprint $table) { | ||
$table->id(); | ||
$table->string('namespace')->nullable()->default(null)->index(); | ||
$table->string('handle'); | ||
$table->json('data'); | ||
$table->timestamps(); | ||
|
||
$table->unique(['handle', 'namespace']); | ||
}); | ||
|
||
$this->seedDefaultBlueprint(); | ||
} | ||
|
||
public function down() | ||
{ | ||
Schema::dropIfExists($this->prefix('blueprints')); | ||
} | ||
|
||
public function seedDefaultBlueprint() | ||
{ | ||
try { | ||
$config = json_encode([ | ||
'fields' => [ | ||
[ | ||
'field' => [ | ||
'type' => 'markdown', | ||
'display' => 'Content', | ||
'localizable' => true, | ||
], | ||
'handle' => 'content', | ||
], | ||
[ | ||
'field' => [ | ||
'type' => 'users', | ||
'display' => 'Author', | ||
'default' => 'current', | ||
'localizable' => true, | ||
'max_items' => 1, | ||
], | ||
'handle' => 'author', | ||
], | ||
[ | ||
'field' => [ | ||
'type' => 'template', | ||
'display' => 'Template', | ||
'localizable' => true, | ||
], | ||
'handle' => 'template', | ||
], | ||
], | ||
]); | ||
} catch (\JsonException $e) { | ||
$config = '[]'; | ||
} | ||
|
||
DB::table($this->prefix('blueprints'))->insert([ | ||
'namespace' => null, | ||
'handle' => 'default', | ||
'data' => $config, | ||
'created_at' => Carbon::now(), | ||
]); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
use Statamic\Eloquent\Database\BaseMigration as Migration; | ||
|
||
return new class extends Migration { | ||
public function up() | ||
{ | ||
Schema::create($this->prefix('collections'), function (Blueprint $table) { | ||
$table->id(); | ||
$table->string('handle')->unique(); | ||
$table->string('title'); | ||
$table->json('settings')->nullable(); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
public function down() | ||
{ | ||
Schema::dropIfExists($this->prefix('collections')); | ||
} | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.