DD.WellWorkover.Cloud/AsbCloudDb
2021-12-03 09:58:48 +05:00
..
Migrations merge dev to this 2021-12-03 09:58:48 +05:00
Model merge dev to this 2021-12-03 09:58:48 +05:00
UsefulQueries BIG. Add timescaleDB into DB. 2021-11-13 18:47:11 +05:00
AsbCloudDb.csproj update EF 2021-09-23 15:26:55 +05:00
EFExtentions.cs refactor built query with less mem allocation. 2021-11-17 10:52:03 +05:00
install pg timescale.md BIG. Add timescaleDB into DB. 2021-11-13 18:47:11 +05:00
Readme.md fix SetpointsController. Add AllowAnonymous. 2021-11-26 17:14:02 +05:00

создать миграцию

dotnet ef migrations add <MigrationName> --project AsbCloudDb

создать миграцию

dotnet ef migrations remvoe <MigrationName> --project AsbCloudDb

- Name of migration class После создания миграции обязательно прочитать сгенерированый код.

Применить миграции

 dotnet ef database update --project .\AsbCloudDb

#backup

sudo -u postgres pg_dump -Fc -U postgres postgres -W | gzip > 2021-09-27_dump.sql.gz
sudo -u postgres pg_dump -Fc -U postgres postgres -W > 2021-11-26_dump.sql

#restore

psql postgres < dump_file_name

sudo -u postgres psql -p 5499 -U postgres postgres -W < 2021-11-16_dump.sql.gz