DD.WellWorkover.Cloud/AsbCloudDb
2021-12-01 17:10:17 +05:00
..
Migrations CS2-123: Fixed role permissions create/update operations 2021-12-01 16:09:06 +05:00
Model CS2-123: Added AdminPermissionController and Service 2021-12-01 17:10:17 +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 use fileshare only when needed. 2021-11-17 13:06:48 +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-13_dump.sql.gz

#restore

psql postgres < dump_file_name

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