| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- using Microsoft.EntityFrameworkCore.Metadata;
- using Microsoft.EntityFrameworkCore.Migrations;
- using System;
- using System.Collections.Generic;
- namespace Winsoft.GOV.XF.WebApi.WXCore.Migrations
- {
- public partial class AddCreatDate : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AddColumn<DateTime>(
- name: "CreateDate",
- table: "WXUser",
- type: "datetime(6)",
- nullable: false,
- defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified))
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
- migrationBuilder.AddColumn<DateTime>(
- name: "CreateDate",
- table: "Bundle",
- type: "datetime(6)",
- nullable: false,
- defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified))
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
- migrationBuilder.AddColumn<int>(
- name: "UserId",
- table: "Bundle",
- type: "int",
- nullable: false,
- defaultValue: 0);
- migrationBuilder.AddColumn<DateTime>(
- name: "CreateDate",
- table: "Asset",
- type: "datetime(6)",
- nullable: false,
- defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified))
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
- }
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropColumn(
- name: "CreateDate",
- table: "WXUser");
- migrationBuilder.DropColumn(
- name: "CreateDate",
- table: "Bundle");
- migrationBuilder.DropColumn(
- name: "UserId",
- table: "Bundle");
- migrationBuilder.DropColumn(
- name: "CreateDate",
- table: "Asset");
- }
- }
- }
|