Hi, I am currently migrating from v1 to v2 on a fairly standard e-commerce setup without too much customization. I started with a fresh stack and am migrating legacy data using postgres_fdw (Foreign Data Wrapper).
I manually set up the new database (user, region, store, tax, sales channel, etc.) from the admin dashboard, and for the rest, I’m using GPT to help me migrate the data structure from the old version to the new one.
CREATE EXTENSION postgres_fdw;
CREATE SERVER source_server FOREIGN DATA WRAPPER postgres_fdw
OPTIONS (host 'hostname', dbname 'source_db');
CREATE USER MAPPING FOR current_user SERVER source_server
OPTIONS (user 'username', password 'password');
CREATE FOREIGN TABLE foreign_table (columns)
SERVER source_server OPTIONS (table_name 'source_table');
INSERT INTO target_table SELECT * FROM foreign_table;
The structure is changing a bit, especially for authentication, customers, and orders, but overall, I managed to do this on my own in 2-3 days, but as I mentioned, it’s a fairly standard e-commerce setup. Despite having a lot of data, there isn’t much customization.
I’m now in the process of switching my front end. It’s taking a bit more time, but with the documentation and starter packs, it should be fine.