As I have a lot of data for a new project, and finally I decide to use my Excel file directly for my customs fields of a post type.
- I have created a post type
- I have created some customs fields into Meta Box - saved data in a custom table.
- I have done 2 posts to see who it reflects into my database (SQL)
- I have converted the Excel file into an SQL file - using a Saas app.
- After a [few] adjustments (quicker than to fill up posts by hand with data), I have uploaded my SQL file into my database (INSERT INTO wp_mytype) - all worked fine
- After I had to make an SQL file for inserting all post IDs - INSERT INTO wp_posts (used the example of the 2 first post)
All seems to work fine. I can see and update any fields in any posts.
As I don't want any surprise in the future, can you tell me if I need to do something else, to make sure my data will be available any time for queries?
Or maybe what I've done is just "bad"?
I don't have more idea about your approach to import data to your database. Just ensure the post IDs are auto-increment (1, 2, 3 ...) when importing data and you have a backup of the database before doing that.
Yes, I took care of the IDs, and that was easy because it's only the beginning of the project.
So far, I am glad that I thought of this way, because I had a lot of data (all countries), and plugins & tools for that were not 100% sure and pretty expensive (Excel → SQL).
Anyway, thanks for your expertise 🙂