feat: VivesPOS landing on Winter CMS 1.2 — theme + plugin + Dockerfile
Some checks are pending
Module sub-split / Sub-split (push) Waiting to run
Some checks are pending
Module sub-split / Sub-split (push) Waiting to run
- Base: wintercms/winter branch 1.2 (full framework) - Theme vivespos: Canvas 7 + Bootstrap 5 CDN, custom CSS - Layout: deferred GTM/GA4 tracking, JSON-LD SoftwareApplication - Partials: hero (offline-first), features, modes (offline/nube toggle), screenshots, pricing (3 planes), comparison, FAQ, CTA - Plugin VivesPOS.Site with ContactForm - Dockerfile: PHP 8.2 Apache, port 80, healthcheck - Added winter/wn-pages, blog, sitemap, seo plugins - Active theme set to vivespos
This commit is contained in:
15
modules/system/tests/fixtures/plugins/database/tester/Plugin.php
vendored
Normal file
15
modules/system/tests/fixtures/plugins/database/tester/Plugin.php
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php namespace Database\Tester;
|
||||
|
||||
use System\Classes\PluginBase;
|
||||
|
||||
class Plugin extends PluginBase
|
||||
{
|
||||
public function pluginDetails()
|
||||
{
|
||||
return [
|
||||
'name' => 'Database Tester Plugin',
|
||||
'description' => 'Plugin for loading tests that involve the database.',
|
||||
'author' => 'Alexey Bobkov, Samuel Georges'
|
||||
];
|
||||
}
|
||||
}
|
||||
BIN
modules/system/tests/fixtures/plugins/database/tester/assets/images/avatar.png
vendored
Normal file
BIN
modules/system/tests/fixtures/plugins/database/tester/assets/images/avatar.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
68
modules/system/tests/fixtures/plugins/database/tester/models/Author.php
vendored
Normal file
68
modules/system/tests/fixtures/plugins/database/tester/models/Author.php
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php namespace Database\Tester\Models;
|
||||
|
||||
use Model;
|
||||
|
||||
class Author extends Model
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string The database table used by the model.
|
||||
*/
|
||||
public $table = 'database_tester_authors';
|
||||
|
||||
/**
|
||||
* @var array Guarded fields
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* @var array Relations
|
||||
*/
|
||||
public $belongsTo = [
|
||||
'user' => ['Database\Tester\Models\User', 'delete' => true],
|
||||
'country' => ['Database\Tester\Models\Country'],
|
||||
'user_soft' => ['Database\Tester\Models\SoftDeleteUser', 'key' => 'user_id', 'softDelete' => true],
|
||||
];
|
||||
|
||||
public $hasMany = [
|
||||
'posts' => 'Database\Tester\Models\Post',
|
||||
];
|
||||
|
||||
public $hasOne = [
|
||||
'phone' => 'Database\Tester\Models\Phone',
|
||||
];
|
||||
|
||||
public $belongsToMany = [
|
||||
'roles' => [
|
||||
'Database\Tester\Models\Role',
|
||||
'table' => 'database_tester_authors_roles'
|
||||
],
|
||||
'executive_authors' => [
|
||||
'Database\Tester\Models\Role',
|
||||
'table' => 'database_tester_authors_roles',
|
||||
'conditions' => 'is_executive = 1'
|
||||
],
|
||||
];
|
||||
|
||||
public $morphMany = [
|
||||
'event_log' => ['Database\Tester\Models\EventLog', 'name' => 'related', 'delete' => true, 'softDelete' => true],
|
||||
];
|
||||
|
||||
public $morphOne = [
|
||||
'meta' => ['Database\Tester\Models\Meta', 'name' => 'taggable'],
|
||||
];
|
||||
|
||||
public $morphToMany = [
|
||||
'tags' => [
|
||||
'Database\Tester\Models\Tag',
|
||||
'name' => 'taggable',
|
||||
'table' => 'database_tester_taggables',
|
||||
'pivot' => ['added_by']
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
class SoftDeleteAuthor extends Author
|
||||
{
|
||||
use \Winter\Storm\Database\Traits\SoftDelete;
|
||||
}
|
||||
40
modules/system/tests/fixtures/plugins/database/tester/models/Category.php
vendored
Normal file
40
modules/system/tests/fixtures/plugins/database/tester/models/Category.php
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php namespace Database\Tester\Models;
|
||||
|
||||
use Model;
|
||||
|
||||
class Category extends Model
|
||||
{
|
||||
/**
|
||||
* @var string The database table used by the model.
|
||||
*/
|
||||
public $table = 'database_tester_categories';
|
||||
|
||||
public $belongsToMany = [
|
||||
'posts' => [
|
||||
'Database\Tester\Models\Post',
|
||||
'table' => 'database_tester_categories_posts',
|
||||
'pivot' => ['category_name', 'post_name']
|
||||
]
|
||||
];
|
||||
|
||||
public function getCustomNameAttribute()
|
||||
{
|
||||
return $this->name.' (#'.$this->id.')';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class CategorySimple extends Category
|
||||
{
|
||||
use \Winter\Storm\Database\Traits\SimpleTree;
|
||||
}
|
||||
|
||||
class CategoryNested extends Category
|
||||
{
|
||||
use \Winter\Storm\Database\Traits\NestedTree;
|
||||
|
||||
/**
|
||||
* @var string The database table used by the model.
|
||||
*/
|
||||
public $table = 'database_tester_categories_nested';
|
||||
}
|
||||
35
modules/system/tests/fixtures/plugins/database/tester/models/Country.php
vendored
Normal file
35
modules/system/tests/fixtures/plugins/database/tester/models/Country.php
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php namespace Database\Tester\Models;
|
||||
|
||||
use Model;
|
||||
|
||||
class Country extends Model
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string The database table used by the model.
|
||||
*/
|
||||
public $table = 'database_tester_countries';
|
||||
|
||||
/**
|
||||
* @var array Guarded fields
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
public $hasMany = [
|
||||
'users' => [
|
||||
'Database\Tester\Models\User',
|
||||
],
|
||||
];
|
||||
|
||||
public $hasManyThrough = [
|
||||
'posts' => [
|
||||
'Database\Tester\Models\Post',
|
||||
'through' => 'Database\Tester\Models\Author',
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
class SoftDeleteCountry extends Country
|
||||
{
|
||||
use \Winter\Storm\Database\Traits\SoftDelete;
|
||||
}
|
||||
30
modules/system/tests/fixtures/plugins/database/tester/models/EventLog.php
vendored
Normal file
30
modules/system/tests/fixtures/plugins/database/tester/models/EventLog.php
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php namespace Database\Tester\Models;
|
||||
|
||||
use Model;
|
||||
|
||||
class EventLog extends Model
|
||||
{
|
||||
use \Winter\Storm\Database\Traits\SoftDelete;
|
||||
|
||||
/**
|
||||
* @var string The database table used by the model.
|
||||
*/
|
||||
public $table = 'database_tester_event_log';
|
||||
|
||||
/**
|
||||
* @var array Guarded fields
|
||||
*/
|
||||
protected $guarded = ['*'];
|
||||
|
||||
/**
|
||||
* @var array Fillable fields
|
||||
*/
|
||||
protected $fillable = [];
|
||||
|
||||
/**
|
||||
* @var array Relations
|
||||
*/
|
||||
public $morphTo = [
|
||||
'related' => []
|
||||
];
|
||||
}
|
||||
24
modules/system/tests/fixtures/plugins/database/tester/models/Meta.php
vendored
Normal file
24
modules/system/tests/fixtures/plugins/database/tester/models/Meta.php
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php namespace Database\Tester\Models;
|
||||
|
||||
use Model;
|
||||
|
||||
class Meta extends Model
|
||||
{
|
||||
public $table = 'database_tester_meta';
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
public $morphTo = [
|
||||
'taggable' => []
|
||||
];
|
||||
|
||||
public $fillable = [
|
||||
'meta_title',
|
||||
'meta_description',
|
||||
'meta_keywords',
|
||||
'canonical_url',
|
||||
'redirect_url',
|
||||
'robot_index',
|
||||
'robot_follow'
|
||||
];
|
||||
}
|
||||
29
modules/system/tests/fixtures/plugins/database/tester/models/Phone.php
vendored
Normal file
29
modules/system/tests/fixtures/plugins/database/tester/models/Phone.php
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php namespace Database\Tester\Models;
|
||||
|
||||
use Model;
|
||||
|
||||
class Phone extends Model
|
||||
{
|
||||
|
||||
/**
|
||||
* @var string The database table used by the model.
|
||||
*/
|
||||
public $table = 'database_tester_phones';
|
||||
|
||||
/**
|
||||
* @var array Guarded fields
|
||||
*/
|
||||
protected $guarded = ['*'];
|
||||
|
||||
/**
|
||||
* @var array Fillable fields
|
||||
*/
|
||||
protected $fillable = [];
|
||||
|
||||
/**
|
||||
* @var array Relations
|
||||
*/
|
||||
public $belongsTo = [
|
||||
'author' => 'Database\Tester\Models\Author',
|
||||
];
|
||||
}
|
||||
151
modules/system/tests/fixtures/plugins/database/tester/models/Post.php
vendored
Normal file
151
modules/system/tests/fixtures/plugins/database/tester/models/Post.php
vendored
Normal file
@@ -0,0 +1,151 @@
|
||||
<?php namespace Database\Tester\Models;
|
||||
|
||||
use Model;
|
||||
|
||||
class Post extends Model
|
||||
{
|
||||
/**
|
||||
* @var string The database table used by the model.
|
||||
*/
|
||||
public $table = 'database_tester_posts';
|
||||
|
||||
/**
|
||||
* @var array Guarded fields
|
||||
*/
|
||||
protected $guarded = ['*'];
|
||||
|
||||
/**
|
||||
* @var array Fillable fields
|
||||
*/
|
||||
protected $fillable = [];
|
||||
|
||||
/**
|
||||
* @var array Relations
|
||||
*/
|
||||
public $belongsTo = [
|
||||
'author' => 'Database\Tester\Models\Author',
|
||||
];
|
||||
|
||||
public $belongsToMany = [
|
||||
'categories' => [
|
||||
'Database\Tester\Models\Category',
|
||||
'table' => 'database_tester_categories_posts',
|
||||
'pivot' => ['category_name', 'post_name']
|
||||
]
|
||||
];
|
||||
|
||||
public $morphMany = [
|
||||
'event_log' => ['Database\Tester\Models\EventLog', 'name' => 'related', 'delete' => true, 'softDelete' => true],
|
||||
];
|
||||
|
||||
public $morphOne = [
|
||||
'meta' => ['Database\Tester\Models\Meta', 'name' => 'taggable'],
|
||||
];
|
||||
|
||||
public $morphToMany = [
|
||||
'tags' => [
|
||||
'Database\Tester\Models\Tag',
|
||||
'name' => 'taggable',
|
||||
'table' => 'database_tester_taggables',
|
||||
'pivot' => ['added_by']
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
class NullablePost extends Post
|
||||
{
|
||||
use \Winter\Storm\Database\Traits\Nullable;
|
||||
|
||||
/**
|
||||
* @var array Guarded fields
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* @var array List of attributes to nullify
|
||||
*/
|
||||
protected $nullable = [
|
||||
'author_nickname',
|
||||
];
|
||||
}
|
||||
|
||||
class SluggablePost extends Post
|
||||
{
|
||||
use \Winter\Storm\Database\Traits\Sluggable;
|
||||
|
||||
/**
|
||||
* @var array Guarded fields
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* @var array List of attributes to automatically generate unique URL names (slugs) for.
|
||||
*/
|
||||
protected $slugs = [
|
||||
'slug' => 'title',
|
||||
'long_slug' => ['title', 'description']
|
||||
];
|
||||
}
|
||||
|
||||
class RevisionablePost extends Post
|
||||
{
|
||||
use \Winter\Storm\Database\Traits\Revisionable;
|
||||
use \Winter\Storm\Database\Traits\SoftDelete;
|
||||
|
||||
/**
|
||||
* @var array Guarded fields
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* @var array Dates
|
||||
*/
|
||||
protected $dates = ['published_at', 'deleted_at'];
|
||||
|
||||
/**
|
||||
* @var array Monitor these attributes for changes.
|
||||
*/
|
||||
protected $revisionable = [
|
||||
'title',
|
||||
'slug',
|
||||
'description',
|
||||
'is_published',
|
||||
'published_at',
|
||||
'deleted_at'
|
||||
];
|
||||
|
||||
/**
|
||||
* @var int Maximum number of revision records to keep.
|
||||
*/
|
||||
public $revisionableLimit = 8;
|
||||
|
||||
/**
|
||||
* @var array Relations
|
||||
*/
|
||||
public $morphMany = [
|
||||
'revision_history' => ['System\Models\Revision', 'name' => 'revisionable']
|
||||
];
|
||||
|
||||
/**
|
||||
* The user who made the revision.
|
||||
*/
|
||||
public function getRevisionableUser()
|
||||
{
|
||||
return 7;
|
||||
}
|
||||
}
|
||||
|
||||
class ValidationPost extends Post
|
||||
{
|
||||
use \Winter\Storm\Database\Traits\Validation;
|
||||
|
||||
/**
|
||||
* @var array Guarded fields
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
public $rules = [
|
||||
'title' => 'required|min:3|max:255',
|
||||
'slug' => ['required', 'regex:/^[a-z0-9\/\:_\-\*\[\]\+\?\|]*$/i', 'unique:database_tester_posts'],
|
||||
];
|
||||
}
|
||||
34
modules/system/tests/fixtures/plugins/database/tester/models/Role.php
vendored
Normal file
34
modules/system/tests/fixtures/plugins/database/tester/models/Role.php
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php namespace Database\Tester\Models;
|
||||
|
||||
use Model;
|
||||
|
||||
/**
|
||||
* Role Model
|
||||
*/
|
||||
class Role extends Model
|
||||
{
|
||||
/**
|
||||
* @var string The database table used by the model.
|
||||
*/
|
||||
public $table = 'database_tester_roles';
|
||||
|
||||
/**
|
||||
* @var array Guarded fields
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* @var array Fillable fields
|
||||
*/
|
||||
protected $fillable = [];
|
||||
|
||||
/**
|
||||
* @var array Relations
|
||||
*/
|
||||
public $belongsToMany = [
|
||||
'authors' => [
|
||||
'Database\Tester\Models\User',
|
||||
'table' => 'database_tester_authors_roles'
|
||||
],
|
||||
];
|
||||
}
|
||||
36
modules/system/tests/fixtures/plugins/database/tester/models/Tag.php
vendored
Normal file
36
modules/system/tests/fixtures/plugins/database/tester/models/Tag.php
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php namespace Database\Tester\Models;
|
||||
|
||||
use Model;
|
||||
|
||||
class Tag extends Model
|
||||
{
|
||||
/**
|
||||
* @var string The database table used by the model.
|
||||
*/
|
||||
public $table = 'database_tester_tags';
|
||||
|
||||
/**
|
||||
* @var array Guarded fields
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* @var array Fillable fields
|
||||
*/
|
||||
protected $fillable = [];
|
||||
|
||||
public $morphedByMany = [
|
||||
'authors' => [
|
||||
'Database\Tester\Models\Author',
|
||||
'name' => 'taggable',
|
||||
'table' => 'database_tester_taggables',
|
||||
'pivot' => ['added_by'],
|
||||
],
|
||||
'posts' => [
|
||||
'Database\Tester\Models\Post',
|
||||
'name' => 'taggable',
|
||||
'table' => 'database_tester_taggables',
|
||||
'pivot' => ['added_by'],
|
||||
],
|
||||
];
|
||||
}
|
||||
69
modules/system/tests/fixtures/plugins/database/tester/models/User.php
vendored
Normal file
69
modules/system/tests/fixtures/plugins/database/tester/models/User.php
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php namespace Database\Tester\Models;
|
||||
|
||||
use Model;
|
||||
|
||||
class User extends Model
|
||||
{
|
||||
/**
|
||||
* @var string The database table used by the model.
|
||||
*/
|
||||
public $table = 'database_tester_users';
|
||||
|
||||
/**
|
||||
* @var array Guarded fields
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* @var array Relations
|
||||
*/
|
||||
public $hasOne = [
|
||||
'author' => [
|
||||
'Database\Tester\Models\Author',
|
||||
]
|
||||
];
|
||||
|
||||
public $hasOneThrough = [
|
||||
'phone' => [
|
||||
'Database\Tester\Models\Phone',
|
||||
'through' => 'Database\Tester\Models\Author',
|
||||
],
|
||||
];
|
||||
|
||||
public $attachOne = [
|
||||
'avatar' => 'System\Models\File'
|
||||
];
|
||||
|
||||
public $attachMany = [
|
||||
'photos' => 'System\Models\File'
|
||||
];
|
||||
}
|
||||
|
||||
class SoftDeleteUser extends User
|
||||
{
|
||||
use \Winter\Storm\Database\Traits\SoftDelete;
|
||||
}
|
||||
|
||||
class UserWithAuthor extends User
|
||||
{
|
||||
public $hasOne = [
|
||||
'author' => ['Database\Tester\Models\Author', 'key' => 'user_id', 'delete' => true],
|
||||
];
|
||||
}
|
||||
|
||||
class UserWithSoftAuthor extends User
|
||||
{
|
||||
public $hasOne = [
|
||||
'author' => ['Database\Tester\Models\SoftDeleteAuthor', 'key' => 'user_id', 'softDelete' => true],
|
||||
];
|
||||
}
|
||||
|
||||
class UserWithAuthorAndSoftDelete extends UserWithAuthor
|
||||
{
|
||||
use \Winter\Storm\Database\Traits\SoftDelete;
|
||||
}
|
||||
|
||||
class UserWithSoftAuthorAndSoftDelete extends UserWithSoftAuthor
|
||||
{
|
||||
use \Winter\Storm\Database\Traits\SoftDelete;
|
||||
}
|
||||
26
modules/system/tests/fixtures/plugins/database/tester/updates/create_authors_table.php
vendored
Normal file
26
modules/system/tests/fixtures/plugins/database/tester/updates/create_authors_table.php
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php namespace Database\Tester\Updates;
|
||||
|
||||
use Schema;
|
||||
use Winter\Storm\Database\Updates\Migration;
|
||||
|
||||
class CreateAuthorsTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('database_tester_authors', function ($table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->integer('user_id')->unsigned()->index()->nullable();
|
||||
$table->integer('country_id')->unsigned()->index()->nullable();
|
||||
$table->string('name')->nullable();
|
||||
$table->string('email')->nullable();
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('database_tester_authors');
|
||||
}
|
||||
}
|
||||
46
modules/system/tests/fixtures/plugins/database/tester/updates/create_categories_table.php
vendored
Normal file
46
modules/system/tests/fixtures/plugins/database/tester/updates/create_categories_table.php
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php namespace Database\Tester\Updates;
|
||||
|
||||
use Schema;
|
||||
use Winter\Storm\Database\Updates\Migration;
|
||||
|
||||
class CreateCategoriesTable extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
Schema::create('database_tester_categories', function ($table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->integer('parent_id')->nullable();
|
||||
$table->string('name')->nullable();
|
||||
$table->string('slug')->nullable()->index()->unique();
|
||||
$table->string('description')->nullable();
|
||||
$table->integer('company_id')->unsigned()->nullable();
|
||||
$table->string('language', 3)->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
|
||||
Schema::create('database_tester_categories_nested', function ($table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->integer('parent_id')->nullable();
|
||||
$table->integer('nest_left')->nullable();
|
||||
$table->integer('nest_right')->nullable();
|
||||
$table->integer('nest_depth')->nullable();
|
||||
$table->string('name')->nullable();
|
||||
$table->string('slug')->nullable()->index()->unique();
|
||||
$table->string('description')->nullable();
|
||||
$table->integer('company_id')->unsigned()->nullable();
|
||||
$table->string('language', 3)->nullable();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('database_tester_categories');
|
||||
Schema::dropIfExists('database_tester_categories_nested');
|
||||
}
|
||||
}
|
||||
23
modules/system/tests/fixtures/plugins/database/tester/updates/create_countries_table.php
vendored
Normal file
23
modules/system/tests/fixtures/plugins/database/tester/updates/create_countries_table.php
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php namespace Database\Tester\Updates;
|
||||
|
||||
use Schema;
|
||||
use Winter\Storm\Database\Updates\Migration;
|
||||
|
||||
class CreateCountriesTable extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::create('database_tester_countries', function ($table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('name')->nullable();
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('database_tester_countries');
|
||||
}
|
||||
}
|
||||
26
modules/system/tests/fixtures/plugins/database/tester/updates/create_event_log_table.php
vendored
Normal file
26
modules/system/tests/fixtures/plugins/database/tester/updates/create_event_log_table.php
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php namespace Database\Tester\Updates;
|
||||
|
||||
use Schema;
|
||||
use Winter\Storm\Database\Updates\Migration;
|
||||
|
||||
class CreateEventLogTable extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
Schema::create('database_tester_event_log', function ($table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('action', 30)->nullable();
|
||||
$table->string('related_id')->index()->nullable();
|
||||
$table->string('related_type')->index()->nullable();
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('database_tester_event_log');
|
||||
}
|
||||
}
|
||||
30
modules/system/tests/fixtures/plugins/database/tester/updates/create_meta_table.php
vendored
Normal file
30
modules/system/tests/fixtures/plugins/database/tester/updates/create_meta_table.php
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php namespace Database\Tester\Updates;
|
||||
|
||||
use Schema;
|
||||
use Winter\Storm\Database\Updates\Migration;
|
||||
|
||||
class CreateMetaTable extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
Schema::create('database_tester_meta', function ($table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id')->unsigned();
|
||||
$table->integer('taggable_id')->unsigned()->index()->nullable();
|
||||
$table->string('taggable_type')->nullable();
|
||||
$table->string('meta_title')->nullable();
|
||||
$table->string('meta_description')->nullable();
|
||||
$table->string('meta_keywords')->nullable();
|
||||
$table->string('canonical_url')->nullable();
|
||||
$table->string('redirect_url')->nullable();
|
||||
$table->string('robot_index')->nullable();
|
||||
$table->string('robot_follow')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('database_tester_meta');
|
||||
}
|
||||
}
|
||||
24
modules/system/tests/fixtures/plugins/database/tester/updates/create_phones_table.php
vendored
Normal file
24
modules/system/tests/fixtures/plugins/database/tester/updates/create_phones_table.php
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php namespace Database\Tester\Updates;
|
||||
|
||||
use Schema;
|
||||
use Winter\Storm\Database\Updates\Migration;
|
||||
|
||||
class CreatePhonesTable extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
Schema::create('database_tester_phones', function ($table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('number')->nullable();
|
||||
$table->integer('author_id')->unsigned()->index()->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('database_tester_phones');
|
||||
}
|
||||
}
|
||||
41
modules/system/tests/fixtures/plugins/database/tester/updates/create_posts_table.php
vendored
Normal file
41
modules/system/tests/fixtures/plugins/database/tester/updates/create_posts_table.php
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php namespace Database\Tester\Updates;
|
||||
|
||||
use Schema;
|
||||
use Winter\Storm\Database\Updates\Migration;
|
||||
|
||||
class CreatePostsTable extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
Schema::create('database_tester_posts', function ($table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('title')->nullable();
|
||||
$table->string('slug')->nullable()->index();
|
||||
$table->text('long_slug')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->boolean('is_published')->default(false);
|
||||
$table->timestamp('published_at')->nullable();
|
||||
$table->integer('author_id')->unsigned()->index()->nullable();
|
||||
$table->string('author_nickname')->default('Winter')->nullable();
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('database_tester_categories_posts', function ($table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->integer('category_id')->unsigned();
|
||||
$table->integer('post_id')->unsigned();
|
||||
$table->primary(['category_id', 'post_id']);
|
||||
$table->string('category_name')->nullable();
|
||||
$table->string('post_name')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('database_tester_categories_posts');
|
||||
Schema::dropIfExists('database_tester_posts');
|
||||
}
|
||||
}
|
||||
34
modules/system/tests/fixtures/plugins/database/tester/updates/create_roles_table.php
vendored
Normal file
34
modules/system/tests/fixtures/plugins/database/tester/updates/create_roles_table.php
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php namespace Database\Tester\Updates;
|
||||
|
||||
use Schema;
|
||||
use Winter\Storm\Database\Updates\Migration;
|
||||
|
||||
class CreateRolesTable extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
Schema::create('database_tester_roles', function ($table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('name')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('database_tester_authors_roles', function ($table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->integer('author_id')->unsigned();
|
||||
$table->integer('role_id')->unsigned();
|
||||
$table->primary(['author_id', 'role_id']);
|
||||
$table->string('clearance_level')->nullable();
|
||||
$table->boolean('is_executive')->default(false);
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('database_tester_roles');
|
||||
Schema::dropIfExists('database_tester_authors_roles');
|
||||
}
|
||||
}
|
||||
31
modules/system/tests/fixtures/plugins/database/tester/updates/create_tags_table.php
vendored
Normal file
31
modules/system/tests/fixtures/plugins/database/tester/updates/create_tags_table.php
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php namespace Database\Tester\Updates;
|
||||
|
||||
use Schema;
|
||||
use Winter\Storm\Database\Updates\Migration;
|
||||
|
||||
class CreateTagsTable extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
Schema::create('database_tester_tags', function ($table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('database_tester_taggables', function ($table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->unsignedInteger('tag_id');
|
||||
$table->morphs('taggable', 'testings_taggable');
|
||||
$table->unsignedInteger('added_by')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('database_tester_taggables');
|
||||
Schema::dropIfExists('database_tester_tags');
|
||||
}
|
||||
}
|
||||
25
modules/system/tests/fixtures/plugins/database/tester/updates/create_users_table.php
vendored
Normal file
25
modules/system/tests/fixtures/plugins/database/tester/updates/create_users_table.php
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php namespace Database\Tester\Updates;
|
||||
|
||||
use Schema;
|
||||
use Winter\Storm\Database\Updates\Migration;
|
||||
|
||||
class CreateUsersTable extends Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
Schema::create('database_tester_users', function ($table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->increments('id');
|
||||
$table->string('name')->nullable();
|
||||
$table->string('email')->nullable();
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('database_tester_users');
|
||||
}
|
||||
}
|
||||
13
modules/system/tests/fixtures/plugins/database/tester/updates/version.yaml
vendored
Normal file
13
modules/system/tests/fixtures/plugins/database/tester/updates/version.yaml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
1.0.1: First version of Tester
|
||||
1.0.2:
|
||||
- Create tables
|
||||
- create_posts_table.php
|
||||
- create_authors_table.php
|
||||
- create_phones_table.php
|
||||
- create_categories_table.php
|
||||
- create_roles_table.php
|
||||
- create_users_table.php
|
||||
- create_event_log_table.php
|
||||
- create_meta_table.php
|
||||
- create_countries_table.php
|
||||
- create_tags_table.php
|
||||
Reference in New Issue
Block a user