To migrate the data from old PostgreSQL database to the new one use the pg_dump command.
Under Windows it can be downloaded here: https://www.enterprisedb.com/download-postgresql-binaries
Under Linux you can get it with PostgreSQL installation.
Next remove a few top and bottom lines from the backup file which pertain to users (we come with a preexisting user in the new db).
Remove every line which assigns table ownership to a user.
Finally execute the following to create the migrations table.
CREATE TABLE IF NOT EXISTS "__EFMigrationsHistory" (
"MigrationId" character varying(150) NOT NULL,
"ProductVersion" character varying(32) NOT NULL,
CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY ("MigrationId")
);
INSERT INTO "__EFMigrationsHistory" ("MigrationId", "ProductVersion")
VALUES ('20230419204938_InitialCreate', '7.0.4');
To migrate the data from old PostgreSQL database to the new one use the
pg_dump
command. Under Windows it can be downloaded here: https://www.enterprisedb.com/download-postgresql-binaries Under Linux you can get it with PostgreSQL installation.Next remove a few top and bottom lines from the backup file which pertain to users (we come with a preexisting user in the new db). Remove every line which assigns table ownership to a user.
Then run the backup file against the new database
Finally execute the following to create the migrations table.