diff --git a/composer.json b/composer.json index 836a32d..375f45c 100644 --- a/composer.json +++ b/composer.json @@ -16,8 +16,8 @@ } ], "support": { - "issues": "https://github.com/laravel-ready/theme-store/issues", - "source": "https://github.com/laravel-ready/theme-store" + "issues": "https://github.com/laravel-ready/readable-numbers/issues", + "source": "https://github.com/laravel-ready/readable-numbers" }, "require": { "php": "^8.0.2", diff --git a/database/migrations/2022_01_01_100000_create_ts_themes_table.php b/database/migrations/2022_01_01_100000_create_ts_themes_table.php deleted file mode 100644 index b6ff542..0000000 --- a/database/migrations/2022_01_01_100000_create_ts_themes_table.php +++ /dev/null @@ -1,60 +0,0 @@ -prefix = Config::get('theme-store.default_table_prefix', 'ts_'); - - $this->table = "{$this->prefix}_themes"; - } - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - if (!Schema::hasTable($this->table)) { - Schema::create($this->table, function (Blueprint $table) { - $table->bigIncrements('id'); - - $table->string('name', 50); - $table->string('slug', 50)->unique(); - $table->text('description'); - $table->string('vendor', 50); - $table->string('group', 50); - $table->boolean('status')->default(true); - $table->string('cover', 50)->nullable(); - $table->boolean('featured')->default(false); - - $table->unique(['slug', 'vendor', 'group']); - - $table->softDeletes(); - $table->timestamps(); - }); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - if (Schema::hasTable($this->table)) { - Schema::table($this->table, function (Blueprint $table) { - $table->dropUnique(['slug', 'vendor', 'group']); - - $table->dropIfExists(); - }); - } - } -} diff --git a/database/migrations/2022_01_01_100001_create_ts_authors_table.php b/database/migrations/2022_01_01_100001_create_ts_authors_table.php deleted file mode 100644 index 8eaa6e5..0000000 --- a/database/migrations/2022_01_01_100001_create_ts_authors_table.php +++ /dev/null @@ -1,55 +0,0 @@ -prefix = Config::get('theme-store.default_table_prefix', 'ts_'); - - $this->table = "{$this->prefix}_authors"; - } - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - if (!Schema::hasTable($this->table)) { - Schema::create($this->table, function (Blueprint $table) { - $table->bigIncrements('id'); - - $table->string('name', 50); - $table->string('slug', 50); - $table->string('contact', 50); - $table->string('avatar', 50)->nullable(); - $table->boolean('featured')->default(false); - - $table->softDeletes(); - $table->timestamps(); - - $table->unique(['name', 'contact']); - }); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - if (Schema::hasTable($this->table)) { - Schema::table($this->table, function (Blueprint $table) { - $table->dropIfExists(); - }); - } - } -} diff --git a/database/migrations/2022_01_01_100002_create_ts_themes_authors_table.php b/database/migrations/2022_01_01_100002_create_ts_themes_authors_table.php deleted file mode 100644 index 29b76ba..0000000 --- a/database/migrations/2022_01_01_100002_create_ts_themes_authors_table.php +++ /dev/null @@ -1,52 +0,0 @@ -prefix = Config::get('theme-store.default_table_prefix', 'ts_'); - - $this->table = "{$this->prefix}_themes_authors"; - } - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - if (!Schema::hasTable($this->table)) { - Schema::create($this->table, function (Blueprint $table) { - $table->foreignId('theme_id') - ->constrained("{$this->prefix}_themes") - ->onDelete('cascade'); - - $table->foreignId('author_id') - ->constrained("{$this->prefix}_authors") - ->onDelete('cascade'); - - $table->unique(['theme_id', 'author_id']); - }); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - if (Schema::hasTable($this->table)) { - Schema::table($this->table, function (Blueprint $table) { - $table->dropIfExists(); - }); - } - } -} diff --git a/database/migrations/2022_01_01_100003_create_ts_categories_table.php b/database/migrations/2022_01_01_100003_create_ts_categories_table.php deleted file mode 100644 index cb64d0a..0000000 --- a/database/migrations/2022_01_01_100003_create_ts_categories_table.php +++ /dev/null @@ -1,53 +0,0 @@ -prefix = Config::get('theme-store.default_table_prefix', 'ts_'); - - $this->table = "{$this->prefix}_categories"; - } - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - if (!Schema::hasTable($this->table)) { - Schema::create($this->table, function (Blueprint $table) { - $table->bigIncrements('id'); - - $table->string('name', 50); - $table->string('slug', 50)->unique(); - $table->text('description', 500)->nullable(); - $table->string('image', 50)->nullable(); - $table->boolean('featured')->default(false); - - $table->softDeletes(); - $table->timestamps(); - }); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - if (Schema::hasTable($this->table)) { - Schema::table($this->table, function (Blueprint $table) { - $table->dropIfExists(); - }); - } - } -} diff --git a/database/migrations/2022_01_01_100004_create_ts_themes_categories_table.php b/database/migrations/2022_01_01_100004_create_ts_themes_categories_table.php deleted file mode 100644 index 6e40011..0000000 --- a/database/migrations/2022_01_01_100004_create_ts_themes_categories_table.php +++ /dev/null @@ -1,50 +0,0 @@ -prefix = Config::get('theme-store.default_table_prefix', 'ts_'); - - $this->table = "{$this->prefix}_themes_categories"; - } - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - if (!Schema::hasTable($this->table)) { - Schema::create($this->table, function (Blueprint $table) { - $table->foreignId('theme_id') - ->constrained("{$this->prefix}_themes") - ->onDelete('cascade'); - - $table->foreignId('category_id') - ->constrained("{$this->prefix}_categories") - ->onDelete('cascade'); - - $table->unique(['theme_id', 'category_id']); - }); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::table($this->table, function (Blueprint $table) { - $table->dropIfExists(); - }); - } -} diff --git a/database/migrations/2022_01_01_100005_create_ts_releases_table.php b/database/migrations/2022_01_01_100005_create_ts_releases_table.php deleted file mode 100644 index b7fe066..0000000 --- a/database/migrations/2022_01_01_100005_create_ts_releases_table.php +++ /dev/null @@ -1,59 +0,0 @@ -prefix = Config::get('theme-store.default_table_prefix', 'ts_'); - - $this->table = "{$this->prefix}_releases"; - } - - /** - * Run the migrations. - * - * @return void - */ - public function up() - { - if (!Schema::hasTable($this->table)) { - Schema::create($this->table, function (Blueprint $table) { - $table->bigIncrements('id'); - - $table->foreignId('theme_id') - ->constrained("{$this->prefix}_themes") - ->onDelete('cascade'); - - $table->text('notes'); - $table->string('version', 20)->unique(); - $table->string('zip_file', 50); - $table->bigInteger('file_size')->nullable(); - $table->boolean('status')->default(true); - - $table->softDeletes(); - $table->timestamps(); - }); - } - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - if (Schema::hasTable($this->table)) { - Schema::table($this->table, function (Blueprint $table) { - $table->dropConstrainedForeignId('theme_id'); - - $table->dropIfExists(); - }); - } - } -} diff --git a/development.md b/development.md deleted file mode 100644 index cdbf25d..0000000 --- a/development.md +++ /dev/null @@ -1,16 +0,0 @@ -## Migrations - -Publish the migrations - -`php artisan vendor:publish --tag=theme-store-migrations --force` - -Apply migrations - -`php artisan migrate --path=/database/migrations/laravel-ready/theme-store` - -Rollback migrations - -`php artisan migrate:rollback --path=/database/migrations/laravel-ready/theme-store` - - -`php artisan migrate:refresh`