Comments (6)
Yeah even using the installer still got migration issue.
really need help this part really confusing to solve this part, I did try find a solution around.
from smmbooster.
Can you share the scheme of service table and categories table @AimanHakeem
Because sometimes its the difference between the type of column in tables
from smmbooster.
@ikramulmustafa
service_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateServicesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('services', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->id();
$table->integer('category_id');
$table->integer('api_provider_id')->nullable();
$table->integer('api_provider_service_id')->nullable();
$table->enum('type',['normal','api'])->default('normal');
$table->enum('status',['active','deactive']);
$table->text('name');
$table->decimal('rate', 10, 4);
$table->decimal('rate_original', 10, 4)->nullable();
$table->integer('min');
$table->integer('max');
$table->float('percentage_increase')->nullable();;
$table->text('description')->nullable();
$table->timestamps();
$table->foreign('category_id')->references('id')->on('categories')->onDelete('cascade');
$table->foreign('api_provider_id')->references('id')->on('api_providers')->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('services');
}
}
categories_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCategoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('categories', function (Blueprint $table) {
$table->id();
$table->string('name')->unique();
$table->integer('sort')->nullable()->default(0);
$table->enum('status',['active','deactive']);
$table->text('description')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::disableForeignKeyConstraints();
Schema::dropIfExists('categories');
}
}
from smmbooster.
Yeah even using the installer still got migration issue.
According to the Image Your Category table is after the service but according to the scenario it should be reverse
Can You rename the Category table timestamp less then services table migration it will fixed your problem probably because your migration code seem fine
from smmbooster.
2021-06-15_103121_create_categories_table
rename categories migration file to this
from smmbooster.
Same issue , i tried to migrate the categories table first. @ikramulmustafa
from smmbooster.
Related Issues (18)
- Custom API HOT 3
- Service engine HOT 4
- some problems
- Payment Method HOT 1
- Template
- Missing files
- Smm
- 500 SERVER ERROR
- How can I create my own marketing services? not an smm panel, I want to do the services
- Errors & missing files
- So many redirects HOT 3
- script testing HOT 5
- no working HOT 5
- Is this project still active? HOT 1
- Hello, many files are missing, Please check the files you uploaded to github HOT 13
- Error 500 HOT 3
- Missing Files in Public Folder
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smmbooster.