123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- using Microsoft.EntityFrameworkCore.Migrations;
- #nullable disable
- namespace MTWorkHR.Infrastructure.Migrations
- {
- /// <inheritdoc />
- public partial class addCompanyIdAll : Migration
- {
- /// <inheritdoc />
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AddColumn<long>(
- name: "CompanyId",
- table: "UserTasks",
- type: "bigint",
- nullable: false,
- defaultValue: 0L);
- migrationBuilder.AddColumn<long>(
- name: "CompanyId",
- table: "Teams",
- type: "bigint",
- nullable: false,
- defaultValue: 0L);
- migrationBuilder.AddColumn<long>(
- name: "CompanyId",
- table: "Projects",
- type: "bigint",
- nullable: false,
- defaultValue: 0L);
- migrationBuilder.AddColumn<long>(
- name: "CompanyId",
- table: "OrderRequests",
- type: "bigint",
- nullable: false,
- defaultValue: 0L);
- migrationBuilder.AddColumn<long>(
- name: "CompanyId",
- table: "OrderAllocations",
- type: "bigint",
- nullable: false,
- defaultValue: 0L);
- migrationBuilder.AddColumn<long>(
- name: "CompanyId",
- table: "Meetings",
- type: "bigint",
- nullable: false,
- defaultValue: 0L);
- migrationBuilder.AddColumn<long>(
- name: "CompanyId",
- table: "Attendances",
- type: "bigint",
- nullable: false,
- defaultValue: 0L);
- migrationBuilder.CreateIndex(
- name: "IX_UserTasks_CompanyId",
- table: "UserTasks",
- column: "CompanyId");
- migrationBuilder.CreateIndex(
- name: "IX_Teams_CompanyId",
- table: "Teams",
- column: "CompanyId");
- migrationBuilder.CreateIndex(
- name: "IX_Projects_CompanyId",
- table: "Projects",
- column: "CompanyId");
- migrationBuilder.CreateIndex(
- name: "IX_OrderRequests_CompanyId",
- table: "OrderRequests",
- column: "CompanyId");
- migrationBuilder.CreateIndex(
- name: "IX_OrderAllocations_CompanyId",
- table: "OrderAllocations",
- column: "CompanyId");
- migrationBuilder.CreateIndex(
- name: "IX_Meetings_CompanyId",
- table: "Meetings",
- column: "CompanyId");
- migrationBuilder.CreateIndex(
- name: "IX_Attendances_CompanyId",
- table: "Attendances",
- column: "CompanyId");
- }
- /// <inheritdoc />
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropIndex(
- name: "IX_UserTasks_CompanyId",
- table: "UserTasks");
- migrationBuilder.DropIndex(
- name: "IX_Teams_CompanyId",
- table: "Teams");
- migrationBuilder.DropIndex(
- name: "IX_Projects_CompanyId",
- table: "Projects");
- migrationBuilder.DropIndex(
- name: "IX_OrderRequests_CompanyId",
- table: "OrderRequests");
- migrationBuilder.DropIndex(
- name: "IX_OrderAllocations_CompanyId",
- table: "OrderAllocations");
- migrationBuilder.DropIndex(
- name: "IX_Meetings_CompanyId",
- table: "Meetings");
- migrationBuilder.DropIndex(
- name: "IX_Attendances_CompanyId",
- table: "Attendances");
- migrationBuilder.DropColumn(
- name: "CompanyId",
- table: "UserTasks");
- migrationBuilder.DropColumn(
- name: "CompanyId",
- table: "Teams");
- migrationBuilder.DropColumn(
- name: "CompanyId",
- table: "Projects");
- migrationBuilder.DropColumn(
- name: "CompanyId",
- table: "OrderRequests");
- migrationBuilder.DropColumn(
- name: "CompanyId",
- table: "OrderAllocations");
- migrationBuilder.DropColumn(
- name: "CompanyId",
- table: "Meetings");
- migrationBuilder.DropColumn(
- name: "CompanyId",
- table: "Attendances");
- }
- }
- }
|