Closed tgrantmartin closed 4 years ago
I recommend adding this to the documentation.
That's not the right way to do it, you can simply disable this feature using config option rinvex.attributes.autoload_migrations
If you published your assets, then just disable that option here config/rinvex.attributes.php
I noticed that following the addition of the migration autoload feature, my project attempted to run the migrations from the package rather than my locally published, and in my case, already migrated, migrations. This resulted in an error when running artisan migrate in which the migrations to create the tables were run against a database that already had the tables present.
The resultant error is below: "Migrating: 2020_01_01_000001_create_attributes_table
Illuminate\Database\QueryException : SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'attributes' already exists (SQL: create table
attributes
(id
int unsigned not null auto_increment primary key,slug
varchar(255) not null,name
json not null,description
json null,sort_order
mediumint unsigned not null default '0',group
varchar(255) null,type
varchar(255) not null,is_required
tinyint(1) not null default '0',is_collection
tinyint(1) not null default '0',default
text null,created_at
timestamp null,updated_at
timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')"Solution: Add the following line to the register method of your AppsServiceProvider: app('config')->set('rinvex.attributes.autoload_migrations',false);