|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534 |
- using System;
- using Microsoft.EntityFrameworkCore.Migrations;
-
- namespace Rdh.TestApi.Migrations
- {
- public partial class Init_Entities : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "DrugInfos",
- columns: table => new
- {
- Id = table.Column<string>(type: "TEXT", nullable: false),
- Name = table.Column<string>(type: "TEXT", nullable: true),
- Specifications = table.Column<string>(type: "TEXT", nullable: true),
- Manufacturer = table.Column<string>(type: "TEXT", nullable: true),
- Unit = table.Column<string>(type: "TEXT", nullable: true),
- Creator = table.Column<string>(type: "TEXT", nullable: true),
- CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
- Modifier = table.Column<string>(type: "TEXT", nullable: true),
- LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
- IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
- DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_DrugInfos", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "MedicineKits",
- columns: table => new
- {
- Id = table.Column<string>(type: "TEXT", nullable: false),
- Code = table.Column<string>(type: "TEXT", nullable: true),
- KitType = table.Column<int>(type: "INTEGER", nullable: false),
- Creator = table.Column<string>(type: "TEXT", nullable: true),
- CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
- Modifier = table.Column<string>(type: "TEXT", nullable: true),
- LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
- IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
- DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_MedicineKits", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "OperationRooms",
- columns: table => new
- {
- Id = table.Column<string>(type: "TEXT", nullable: false),
- Name = table.Column<string>(type: "TEXT", nullable: true),
- BaseStationCode = table.Column<string>(type: "TEXT", nullable: true),
- Creator = table.Column<string>(type: "TEXT", nullable: true),
- CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
- Modifier = table.Column<string>(type: "TEXT", nullable: true),
- LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
- IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
- DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_OperationRooms", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "Patients",
- columns: table => new
- {
- Id = table.Column<string>(type: "TEXT", nullable: false),
- Name = table.Column<string>(type: "TEXT", nullable: true),
- PatientNo = table.Column<string>(type: "TEXT", nullable: true),
- Gender = table.Column<int>(type: "INTEGER", nullable: false),
- BirthDay = table.Column<DateTime>(type: "TEXT", nullable: false),
- Creator = table.Column<string>(type: "TEXT", nullable: true),
- CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
- Modifier = table.Column<string>(type: "TEXT", nullable: true),
- LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
- IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
- DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Patients", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "Users",
- columns: table => new
- {
- Id = table.Column<string>(type: "TEXT", nullable: false),
- Name = table.Column<string>(type: "TEXT", nullable: true),
- Code = table.Column<string>(type: "TEXT", nullable: true),
- Creator = table.Column<string>(type: "TEXT", nullable: true),
- CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
- Modifier = table.Column<string>(type: "TEXT", nullable: true),
- LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
- IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
- DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Users", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "DrugBatches",
- columns: table => new
- {
- Id = table.Column<string>(type: "TEXT", nullable: false),
- BatchCode = table.Column<string>(type: "TEXT", nullable: true),
- ManufactureDate = table.Column<DateTime>(type: "TEXT", nullable: true),
- ExpiryDate = table.Column<DateTime>(type: "TEXT", nullable: false),
- DrugId = table.Column<string>(type: "TEXT", nullable: false),
- Creator = table.Column<string>(type: "TEXT", nullable: true),
- CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
- Modifier = table.Column<string>(type: "TEXT", nullable: true),
- LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
- IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
- DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_DrugBatches", x => x.Id);
- table.ForeignKey(
- name: "FK_DrugBatches_DrugInfos_DrugId",
- column: x => x.DrugId,
- principalTable: "DrugInfos",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "MedicineKitConfigs",
- columns: table => new
- {
- Id = table.Column<string>(type: "TEXT", nullable: false),
- KitType = table.Column<int>(type: "INTEGER", nullable: false),
- DrugId = table.Column<string>(type: "TEXT", nullable: false),
- MaxAmount = table.Column<int>(type: "INTEGER", nullable: false),
- WarnAmount = table.Column<int>(type: "INTEGER", nullable: true),
- Creator = table.Column<string>(type: "TEXT", nullable: true),
- CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
- Modifier = table.Column<string>(type: "TEXT", nullable: true),
- LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
- IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
- DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_MedicineKitConfigs", x => x.Id);
- table.ForeignKey(
- name: "FK_MedicineKitConfigs_DrugInfos_DrugId",
- column: x => x.DrugId,
- principalTable: "DrugInfos",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "MedicineKitLocations",
- columns: table => new
- {
- Id = table.Column<string>(type: "TEXT", nullable: false),
- MedicineKitId = table.Column<string>(type: "TEXT", nullable: false),
- OperationRoomId = table.Column<string>(type: "TEXT", nullable: false),
- Location = table.Column<int>(type: "INTEGER", nullable: false),
- Unit = table.Column<string>(type: "TEXT", nullable: true),
- Creator = table.Column<string>(type: "TEXT", nullable: true),
- CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
- Modifier = table.Column<string>(type: "TEXT", nullable: true),
- LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
- IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
- DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_MedicineKitLocations", x => x.Id);
- table.ForeignKey(
- name: "FK_MedicineKitLocations_MedicineKits_MedicineKitId",
- column: x => x.MedicineKitId,
- principalTable: "MedicineKits",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_MedicineKitLocations_OperationRooms_OperationRoomId",
- column: x => x.OperationRoomId,
- principalTable: "OperationRooms",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "Operations",
- columns: table => new
- {
- Id = table.Column<string>(type: "TEXT", nullable: false),
- Name = table.Column<string>(type: "TEXT", nullable: true),
- Department = table.Column<string>(type: "TEXT", nullable: true),
- PatientId = table.Column<string>(type: "TEXT", nullable: false),
- DoctorId = table.Column<string>(type: "TEXT", nullable: false),
- State = table.Column<int>(type: "INTEGER", nullable: false),
- Creator = table.Column<string>(type: "TEXT", nullable: true),
- CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
- Modifier = table.Column<string>(type: "TEXT", nullable: true),
- LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
- IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
- DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Operations", x => x.Id);
- table.ForeignKey(
- name: "FK_Operations_Patients_PatientId",
- column: x => x.PatientId,
- principalTable: "Patients",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_Operations_Users_DoctorId",
- column: x => x.DoctorId,
- principalTable: "Users",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "Drugs",
- columns: table => new
- {
- Id = table.Column<string>(type: "TEXT", nullable: false),
- RFID = table.Column<string>(type: "TEXT", nullable: true),
- DrugBatchId1 = table.Column<string>(type: "TEXT", nullable: true),
- DrugBatchId = table.Column<string>(type: "TEXT", nullable: false),
- Creator = table.Column<string>(type: "TEXT", nullable: true),
- CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
- Modifier = table.Column<string>(type: "TEXT", nullable: true),
- LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
- IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
- DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Drugs", x => x.Id);
- table.ForeignKey(
- name: "FK_Drugs_DrugBatches_DrugBatchId1",
- column: x => x.DrugBatchId1,
- principalTable: "DrugBatches",
- principalColumn: "Id",
- onDelete: ReferentialAction.Restrict);
- });
-
- migrationBuilder.CreateTable(
- name: "MedicineKitStocks",
- columns: table => new
- {
- Id = table.Column<string>(type: "TEXT", nullable: false),
- MedicineKitId = table.Column<string>(type: "TEXT", nullable: false),
- DrugId = table.Column<string>(type: "TEXT", nullable: false),
- MedicineKitDrugState = table.Column<int>(type: "INTEGER", nullable: false),
- Creator = table.Column<string>(type: "TEXT", nullable: true),
- CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
- Modifier = table.Column<string>(type: "TEXT", nullable: true),
- LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
- IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
- DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_MedicineKitStocks", x => x.Id);
- table.ForeignKey(
- name: "FK_MedicineKitStocks_Drugs_DrugId",
- column: x => x.DrugId,
- principalTable: "Drugs",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_MedicineKitStocks_MedicineKits_MedicineKitId",
- column: x => x.MedicineKitId,
- principalTable: "MedicineKits",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "OperationDrugs",
- columns: table => new
- {
- Id = table.Column<string>(type: "TEXT", nullable: false),
- OperationId = table.Column<string>(type: "TEXT", nullable: false),
- DrugId = table.Column<string>(type: "TEXT", nullable: false),
- Creator = table.Column<string>(type: "TEXT", nullable: true),
- CreationTime = table.Column<DateTime>(type: "TEXT", nullable: false),
- Modifier = table.Column<string>(type: "TEXT", nullable: true),
- LastModificationTime = table.Column<DateTime>(type: "TEXT", nullable: true),
- IsDeleted = table.Column<bool>(type: "INTEGER", nullable: false, defaultValue: false),
- DeletionTime = table.Column<DateTime>(type: "TEXT", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_OperationDrugs", x => x.Id);
- table.ForeignKey(
- name: "FK_OperationDrugs_Drugs_DrugId",
- column: x => x.DrugId,
- principalTable: "Drugs",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_OperationDrugs_Operations_OperationId",
- column: x => x.OperationId,
- principalTable: "Operations",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.InsertData(
- table: "MedicineKits",
- columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "KitType", "LastModificationTime", "Modifier" },
- values: new object[] { "ffb59ddd-8448-4ffb-97e7-ef60a0f7ad91", "000", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, 3, null, null });
-
- migrationBuilder.InsertData(
- table: "OperationRooms",
- columns: new[] { "Id", "BaseStationCode", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
- values: new object[] { "c1822c7e-154d-4a0d-b038-b3f3d02c3314", "00", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "手术间1" });
-
- migrationBuilder.InsertData(
- table: "OperationRooms",
- columns: new[] { "Id", "BaseStationCode", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
- values: new object[] { "0ae49e9f-bf4a-4315-aa38-32333c361835", "01", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "手术间2" });
-
- migrationBuilder.InsertData(
- table: "OperationRooms",
- columns: new[] { "Id", "BaseStationCode", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
- values: new object[] { "11f05cb6-98a4-4001-a8c8-724c95c50411", "02", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "手术间3" });
-
- migrationBuilder.InsertData(
- table: "Patients",
- columns: new[] { "Id", "BirthDay", "CreationTime", "Creator", "DeletionTime", "Gender", "LastModificationTime", "Modifier", "Name", "PatientNo" },
- values: new object[] { "c18c3bc5-3895-418a-8f73-1e537678e7fa", new DateTime(1999, 12, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, 1, null, null, "尤梅", "10229521" });
-
- migrationBuilder.InsertData(
- table: "Patients",
- columns: new[] { "Id", "BirthDay", "CreationTime", "Creator", "DeletionTime", "Gender", "LastModificationTime", "Modifier", "Name", "PatientNo" },
- values: new object[] { "ea8d4c8a-bb20-4f70-95ac-d71efd5305a4", new DateTime(1975, 12, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, 0, null, null, "谷乐平", "10228969" });
-
- migrationBuilder.InsertData(
- table: "Patients",
- columns: new[] { "Id", "BirthDay", "CreationTime", "Creator", "DeletionTime", "Gender", "LastModificationTime", "Modifier", "Name", "PatientNo" },
- values: new object[] { "8adf25c9-fde4-4af9-a169-44564fb319dd", new DateTime(1985, 12, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, 1, null, null, "王美华", "10221218" });
-
- migrationBuilder.InsertData(
- table: "Patients",
- columns: new[] { "Id", "BirthDay", "CreationTime", "Creator", "DeletionTime", "Gender", "LastModificationTime", "Modifier", "Name", "PatientNo" },
- values: new object[] { "cc476616-31c5-4b99-bbf6-8e306678fb0d", new DateTime(1965, 12, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, 0, null, null, "骆元方", "10228510" });
-
- migrationBuilder.InsertData(
- table: "Patients",
- columns: new[] { "Id", "BirthDay", "CreationTime", "Creator", "DeletionTime", "Gender", "LastModificationTime", "Modifier", "Name", "PatientNo" },
- values: new object[] { "577d0c49-b977-49bb-b26e-d52e3858324d", new DateTime(1977, 12, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, 1, null, null, "雷胜蓝", "10251888" });
-
- migrationBuilder.InsertData(
- table: "Patients",
- columns: new[] { "Id", "BirthDay", "CreationTime", "Creator", "DeletionTime", "Gender", "LastModificationTime", "Modifier", "Name", "PatientNo" },
- values: new object[] { "2daa455d-d1f7-4a38-a6c4-ced217999377", new DateTime(1987, 12, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, 1, null, null, "郦夏芳", "10229717" });
-
- migrationBuilder.InsertData(
- table: "Patients",
- columns: new[] { "Id", "BirthDay", "CreationTime", "Creator", "DeletionTime", "Gender", "LastModificationTime", "Modifier", "Name", "PatientNo" },
- values: new object[] { "04b9b64b-ec22-4d16-b83c-3e6f016e686e", new DateTime(1995, 12, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, 0, null, null, "陶竹生", "10232853" });
-
- migrationBuilder.InsertData(
- table: "Patients",
- columns: new[] { "Id", "BirthDay", "CreationTime", "Creator", "DeletionTime", "Gender", "LastModificationTime", "Modifier", "Name", "PatientNo" },
- values: new object[] { "437dd193-947e-49d2-a8cf-61eced8f0699", new DateTime(1996, 12, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, 0, null, null, "张和初", "10222577" });
-
- migrationBuilder.InsertData(
- table: "Users",
- columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
- values: new object[] { "e027dc86-d1cc-48dd-9d54-d516719336fd", "bb332f54", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "刘思雨" });
-
- migrationBuilder.InsertData(
- table: "Users",
- columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
- values: new object[] { "8fdbdac2-1903-4f1f-8ed5-a51079c77cb2", "a3ce8445", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "李浩" });
-
- migrationBuilder.InsertData(
- table: "Users",
- columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
- values: new object[] { "ccac22d7-eb79-49ce-bf99-d47204812d64", "bb332e5a", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "罗岩" });
-
- migrationBuilder.InsertData(
- table: "Users",
- columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
- values: new object[] { "c57d60fc-8738-4cf4-b477-60614f03b959", "bb332e52", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "刘强与" });
-
- migrationBuilder.InsertData(
- table: "Users",
- columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
- values: new object[] { "e3c60e42-efe1-45c1-9608-831f5f1cf721", "bb332e53", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "文芳" });
-
- migrationBuilder.InsertData(
- table: "Users",
- columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
- values: new object[] { "bdca9d5d-dda0-4a04-8190-11ecae578b15", "bb332e54", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "何颖" });
-
- migrationBuilder.InsertData(
- table: "Users",
- columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
- values: new object[] { "4d997ded-50c3-4e66-b782-fe661313da4e", "bb332e55", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "张向丽" });
-
- migrationBuilder.InsertData(
- table: "Users",
- columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
- values: new object[] { "14360b6a-c7ea-4081-a613-dd8d193911be", "bb332e56", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "汪玲" });
-
- migrationBuilder.InsertData(
- table: "Users",
- columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
- values: new object[] { "a5b47d2d-ec05-4c04-a8bb-a8e11c9acdea", "bb332e57", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "李长风" });
-
- migrationBuilder.InsertData(
- table: "Users",
- columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
- values: new object[] { "b4b140fc-0723-4b06-a416-6a2c13b1cf9c", "bb332e58", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "吴爱国" });
-
- migrationBuilder.InsertData(
- table: "Users",
- columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
- values: new object[] { "0b89567d-29ac-464a-8989-53ce9590b1ed", "bb332e59", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "白丽" });
-
- migrationBuilder.InsertData(
- table: "Users",
- columns: new[] { "Id", "Code", "CreationTime", "Creator", "DeletionTime", "LastModificationTime", "Modifier", "Name" },
- values: new object[] { "d796d486-ecec-41ac-9313-8b2dcbb081e2", "bb332e51", new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), null, null, null, null, "张宇" });
-
- migrationBuilder.CreateIndex(
- name: "IX_DrugBatches_DrugId",
- table: "DrugBatches",
- column: "DrugId");
-
- migrationBuilder.CreateIndex(
- name: "IX_Drugs_DrugBatchId1",
- table: "Drugs",
- column: "DrugBatchId1");
-
- migrationBuilder.CreateIndex(
- name: "IX_MedicineKitConfigs_DrugId",
- table: "MedicineKitConfigs",
- column: "DrugId");
-
- migrationBuilder.CreateIndex(
- name: "IX_MedicineKitLocations_MedicineKitId",
- table: "MedicineKitLocations",
- column: "MedicineKitId");
-
- migrationBuilder.CreateIndex(
- name: "IX_MedicineKitLocations_OperationRoomId",
- table: "MedicineKitLocations",
- column: "OperationRoomId");
-
- migrationBuilder.CreateIndex(
- name: "IX_MedicineKitStocks_DrugId",
- table: "MedicineKitStocks",
- column: "DrugId");
-
- migrationBuilder.CreateIndex(
- name: "IX_MedicineKitStocks_MedicineKitId",
- table: "MedicineKitStocks",
- column: "MedicineKitId");
-
- migrationBuilder.CreateIndex(
- name: "IX_OperationDrugs_DrugId",
- table: "OperationDrugs",
- column: "DrugId");
-
- migrationBuilder.CreateIndex(
- name: "IX_OperationDrugs_OperationId",
- table: "OperationDrugs",
- column: "OperationId");
-
- migrationBuilder.CreateIndex(
- name: "IX_Operations_DoctorId",
- table: "Operations",
- column: "DoctorId");
-
- migrationBuilder.CreateIndex(
- name: "IX_Operations_PatientId",
- table: "Operations",
- column: "PatientId");
- }
-
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "MedicineKitConfigs");
-
- migrationBuilder.DropTable(
- name: "MedicineKitLocations");
-
- migrationBuilder.DropTable(
- name: "MedicineKitStocks");
-
- migrationBuilder.DropTable(
- name: "OperationDrugs");
-
- migrationBuilder.DropTable(
- name: "OperationRooms");
-
- migrationBuilder.DropTable(
- name: "MedicineKits");
-
- migrationBuilder.DropTable(
- name: "Drugs");
-
- migrationBuilder.DropTable(
- name: "Operations");
-
- migrationBuilder.DropTable(
- name: "DrugBatches");
-
- migrationBuilder.DropTable(
- name: "Patients");
-
- migrationBuilder.DropTable(
- name: "Users");
-
- migrationBuilder.DropTable(
- name: "DrugInfos");
- }
- }
- }
|