123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184 |
- using System;
- using Microsoft.EntityFrameworkCore.Migrations;
- #nullable disable
- namespace MTWorkHR.Infrastructure.Migrations
- {
- /// <inheritdoc />
- public partial class addLogs : Migration
- {
- /// <inheritdoc />
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "AuthLogs",
- columns: table => new
- {
- Id = table.Column<long>(type: "bigint", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- Method = table.Column<string>(type: "nvarchar(max)", nullable: false),
- QueryString = table.Column<string>(type: "nvarchar(max)", nullable: false),
- Input = table.Column<string>(type: "nvarchar(max)", nullable: false),
- CreateDate = table.Column<DateTime>(type: "datetime2", nullable: false),
- CreateUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
- ServerIP = table.Column<string>(type: "nvarchar(max)", nullable: false),
- Channel = table.Column<string>(type: "nvarchar(max)", nullable: false),
- UserIP = table.Column<string>(type: "nvarchar(max)", nullable: false),
- ServiceResponseTimeInSeconds = table.Column<string>(type: "nvarchar(max)", nullable: false),
- ErrorCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
- ErrorDescription = table.Column<string>(type: "nvarchar(max)", nullable: false),
- InnerException = table.Column<string>(type: "nvarchar(max)", nullable: false),
- userAgent = table.Column<string>(type: "nvarchar(max)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AuthLogs", x => x.Id);
- });
- migrationBuilder.CreateTable(
- name: "Companies",
- columns: table => new
- {
- Id = table.Column<long>(type: "bigint", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- CreateUser = table.Column<string>(type: "nvarchar(450)", maxLength: 450, nullable: true),
- UpdateUser = table.Column<string>(type: "nvarchar(450)", maxLength: 450, nullable: true),
- CreateDate = table.Column<DateTime>(type: "datetime2", nullable: false),
- UpdateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
- UserId = table.Column<long>(type: "bigint", nullable: false),
- CompanyName = table.Column<string>(type: "nvarchar(max)", nullable: false),
- CRNumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
- TaxNumber = table.Column<int>(type: "int", nullable: false),
- IsDeleted = table.Column<bool>(type: "bit", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Companies", x => x.Id);
- });
- migrationBuilder.CreateTable(
- name: "FileLogs",
- columns: table => new
- {
- Id = table.Column<long>(type: "bigint", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- Method = table.Column<string>(type: "nvarchar(max)", nullable: false),
- QueryString = table.Column<string>(type: "nvarchar(max)", nullable: false),
- Input = table.Column<string>(type: "nvarchar(max)", nullable: false),
- CreateDate = table.Column<DateTime>(type: "datetime2", nullable: false),
- CreateUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
- ServerIP = table.Column<string>(type: "nvarchar(max)", nullable: false),
- Channel = table.Column<string>(type: "nvarchar(max)", nullable: false),
- UserIP = table.Column<string>(type: "nvarchar(max)", nullable: false),
- ServiceResponseTimeInSeconds = table.Column<string>(type: "nvarchar(max)", nullable: false),
- ErrorCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
- ErrorDescription = table.Column<string>(type: "nvarchar(max)", nullable: false),
- InnerException = table.Column<string>(type: "nvarchar(max)", nullable: false),
- userAgent = table.Column<string>(type: "nvarchar(max)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_FileLogs", x => x.Id);
- });
- migrationBuilder.CreateTable(
- name: "RoleLogs",
- columns: table => new
- {
- Id = table.Column<long>(type: "bigint", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- Method = table.Column<string>(type: "nvarchar(max)", nullable: false),
- QueryString = table.Column<string>(type: "nvarchar(max)", nullable: false),
- Input = table.Column<string>(type: "nvarchar(max)", nullable: false),
- CreateDate = table.Column<DateTime>(type: "datetime2", nullable: false),
- CreateUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
- ServerIP = table.Column<string>(type: "nvarchar(max)", nullable: false),
- Channel = table.Column<string>(type: "nvarchar(max)", nullable: false),
- UserIP = table.Column<string>(type: "nvarchar(max)", nullable: false),
- ServiceResponseTimeInSeconds = table.Column<string>(type: "nvarchar(max)", nullable: false),
- ErrorCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
- ErrorDescription = table.Column<string>(type: "nvarchar(max)", nullable: false),
- InnerException = table.Column<string>(type: "nvarchar(max)", nullable: false),
- userAgent = table.Column<string>(type: "nvarchar(max)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_RoleLogs", x => x.Id);
- });
- migrationBuilder.CreateTable(
- name: "SettingLogs",
- columns: table => new
- {
- Id = table.Column<long>(type: "bigint", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- Method = table.Column<string>(type: "nvarchar(max)", nullable: false),
- QueryString = table.Column<string>(type: "nvarchar(max)", nullable: false),
- Input = table.Column<string>(type: "nvarchar(max)", nullable: false),
- CreateDate = table.Column<DateTime>(type: "datetime2", nullable: false),
- CreateUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
- ServerIP = table.Column<string>(type: "nvarchar(max)", nullable: false),
- Channel = table.Column<string>(type: "nvarchar(max)", nullable: false),
- UserIP = table.Column<string>(type: "nvarchar(max)", nullable: false),
- ServiceResponseTimeInSeconds = table.Column<string>(type: "nvarchar(max)", nullable: false),
- ErrorCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
- ErrorDescription = table.Column<string>(type: "nvarchar(max)", nullable: false),
- InnerException = table.Column<string>(type: "nvarchar(max)", nullable: false),
- userAgent = table.Column<string>(type: "nvarchar(max)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_SettingLogs", x => x.Id);
- });
- migrationBuilder.CreateTable(
- name: "UserLogs",
- columns: table => new
- {
- Id = table.Column<long>(type: "bigint", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- Method = table.Column<string>(type: "nvarchar(max)", nullable: false),
- QueryString = table.Column<string>(type: "nvarchar(max)", nullable: false),
- Input = table.Column<string>(type: "nvarchar(max)", nullable: false),
- CreateDate = table.Column<DateTime>(type: "datetime2", nullable: false),
- CreateUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
- ServerIP = table.Column<string>(type: "nvarchar(max)", nullable: false),
- Channel = table.Column<string>(type: "nvarchar(max)", nullable: false),
- UserIP = table.Column<string>(type: "nvarchar(max)", nullable: false),
- ServiceResponseTimeInSeconds = table.Column<string>(type: "nvarchar(max)", nullable: false),
- ErrorCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
- ErrorDescription = table.Column<string>(type: "nvarchar(max)", nullable: false),
- InnerException = table.Column<string>(type: "nvarchar(max)", nullable: false),
- userAgent = table.Column<string>(type: "nvarchar(max)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_UserLogs", x => x.Id);
- });
- }
- /// <inheritdoc />
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "AuthLogs");
- migrationBuilder.DropTable(
- name: "Companies");
- migrationBuilder.DropTable(
- name: "FileLogs");
- migrationBuilder.DropTable(
- name: "RoleLogs");
- migrationBuilder.DropTable(
- name: "SettingLogs");
- migrationBuilder.DropTable(
- name: "UserLogs");
- }
- }
- }
|