Theme update and issue to upgrade blueprint and seed data
chrisvidal opened this issue · 5 comments
I updated to the latest version v6.3.24
and then seed
php artisan theme:seed artistro08-tailorstartertheme --root
and got the error.
php artisan theme:seed artistro08-tailorstartertheme --root
Seeding Theme...
Importing Blueprints
Migrating Content Tables
- Pages: Content\Page [xc_698afed670f147dd9dcfdc2a0f903ff2c]
- Products: Content\Product [xc_2a9a76d0010c11ed90b6fc95f7401555c]
- Post Authors: Blog\Authors [xc_a181b687ac3711ed87f63fd40555bea7c]
- Posts: Blog\Posts [xc_a113a242ac3711ed82e2cdd679785a5cc]
- Events: Content\Event [xc_817ac186fc5d11ec86016e37945c2034c]
Importing Data
In ThemeSeed.php line 149:
[/Users/christophevidal/Sites/oc-acf/themes/artistro08-tailorstartertheme/seeds/data.yaml] SQLSTATE[23000]: Integrity constraint violation
: 1062 Duplicate entry '1' for key 'xc_698afed670f147dd9dcfdc2a0f903ff2c.PRIMARY' (SQL: insert into `xc_698afed670f147dd9dcfdc2a0f903ff2c`
(`blueprint_uuid`, `id`, `title`, `slug`, `is_enabled`, `published_at`, `expired_at`, `content_group`, `content`, `sharing_image`, `meta_
title`, `meta_description`, `exclude_in_sitemap`, `site_id`, `nest_left`, `nest_right`, `nest_depth`, `published_at_date`, `updated_at`, `
created_at`) values (698afed6-70f1-47dd-9dcf-dc2a0f903ff2, 1, Home, home, 1, ?, ?, simple, <p>Takimata sanctus no eos labore dolor sit dig
nissim consetetur. Gubergren sit aliquyam est sanctus. Sea consequat erat clita sit dolore blandit feugiat kasd. Dolore rebum ea duo ut at
stet sed feugiat diam blandit hendrerit. Lorem est nobis diam duo lorem eum blandit ut diam sit sed nisl. Feugiat nostrud takimata accusa
m option. Accusam iriure tempor odio exerci at magna ullamcorper. Autem labore stet vulputate dolore te takimata duis. Dolor vero dolores
facilisis dolores eos rebum diam lorem vel ut sit. Takimata et no dolores sea dolores sit tation nulla lorem tempor rebum lobortis diam no
numy odio voluptua est. Sit sadipscing invidunt at facilisis hendrerit duis ea sanctus dolor nonumy. Magna ipsum vero sed.</p>, , Home, ,
0, 1, 23, 24, 0, 2023-04-29 12:47:55, 2023-04-29 12:47:55, 2023-04-29 12:47:55))
In Connection.php line 760:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'xc_698afed670f147dd9dcfdc2a0f903ff2c.PRIMARY' (SQL: ins
ert into `xc_698afed670f147dd9dcfdc2a0f903ff2c` (`blueprint_uuid`, `id`, `title`, `slug`, `is_enabled`, `published_at`, `expired_at`, `con
tent_group`, `content`, `sharing_image`, `meta_title`, `meta_description`, `exclude_in_sitemap`, `site_id`, `nest_left`, `nest_right`, `ne
st_depth`, `published_at_date`, `updated_at`, `created_at`) values (698afed6-70f1-47dd-9dcf-dc2a0f903ff2, 1, Home, home, 1, ?, ?, simple,
<p>Takimata sanctus no eos labore dolor sit dignissim consetetur. Gubergren sit aliquyam est sanctus. Sea consequat erat clita sit dolore
blandit feugiat kasd. Dolore rebum ea duo ut at stet sed feugiat diam blandit hendrerit. Lorem est nobis diam duo lorem eum blandit ut dia
m sit sed nisl. Feugiat nostrud takimata accusam option. Accusam iriure tempor odio exerci at magna ullamcorper. Autem labore stet vulputa
te dolore te takimata duis. Dolor vero dolores facilisis dolores eos rebum diam lorem vel ut sit. Takimata et no dolores sea dolores sit t
ation nulla lorem tempor rebum lobortis diam nonumy odio voluptua est. Sit sadipscing invidunt at facilisis hendrerit duis ea sanctus dolo
r nonumy. Magna ipsum vero sed.</p>, , Home, , 0, 1, 23, 24, 0, 2023-04-29 12:47:55, 2023-04-29 12:47:55, 2023-04-29 12:47:55))
In Exception.php line 18:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'xc_698afed670f147dd9dcfdc2a0f903ff2c.PRIMARY'
In PDOStatement.php line 117:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1' for key 'xc_698afed670f147dd9dcfdc2a0f903ff2c.PRIMARY'
I have a child theme and some data in the pages and menu already
That's expected. Since the seeds install the Home page as an ID of 1, there will be an integrity error there.
What I suggest is temporarily commenting out the seed data lines in the seeds.yaml file to make sure all the stuff gets copied over. This is a limitation of October and I haven't found another way around it yet.
ah indeed, I see. this is a OC limitation. That's what I was thinking too but I was hoping you had a workaround :)
is it a conceptual issue with OC?
Seeding should only seed the data.
I just want to update the blueprints and do not need to seed actually.
Does the artisan command migrate the blueprint as well? Seems like a conceptual error to me that I would be surprised of
It's not a conceptual error, I don't think. Usually when you seed the data, it detects the integrity constraint and skips the record. But not sure why it still tries to import it after editing things.
Seeding does seed the data, and the blueprints. That's by design.
and only runs the command tailor:migrate
as far as I know.
running php artisan tailor:migrate
alone works fine