20170928035854_update_users.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. using System;
  3. using System.Collections.Generic;
  4. namespace Winsoft.GOV.XF.WebApi.WXCore.Migrations
  5. {
  6. public partial class update_users : Migration
  7. {
  8. protected override void Up(MigrationBuilder migrationBuilder)
  9. {
  10. migrationBuilder.AddColumn<string>(
  11. name: "City",
  12. table: "WXUser",
  13. type: "longtext",
  14. nullable: true);
  15. migrationBuilder.AddColumn<string>(
  16. name: "Country",
  17. table: "WXUser",
  18. type: "longtext",
  19. nullable: true);
  20. migrationBuilder.AddColumn<string>(
  21. name: "HeadimgUrl",
  22. table: "WXUser",
  23. type: "longtext",
  24. nullable: true);
  25. migrationBuilder.AddColumn<string>(
  26. name: "Nickname",
  27. table: "WXUser",
  28. type: "longtext",
  29. nullable: true);
  30. migrationBuilder.AddColumn<string>(
  31. name: "Province",
  32. table: "WXUser",
  33. type: "longtext",
  34. nullable: true);
  35. migrationBuilder.AddColumn<int>(
  36. name: "Sex",
  37. table: "WXUser",
  38. type: "int",
  39. nullable: false,
  40. defaultValue: 0);
  41. migrationBuilder.AddColumn<string>(
  42. name: "UnionId",
  43. table: "WXUser",
  44. type: "longtext",
  45. nullable: true);
  46. }
  47. protected override void Down(MigrationBuilder migrationBuilder)
  48. {
  49. migrationBuilder.DropColumn(
  50. name: "City",
  51. table: "WXUser");
  52. migrationBuilder.DropColumn(
  53. name: "Country",
  54. table: "WXUser");
  55. migrationBuilder.DropColumn(
  56. name: "HeadimgUrl",
  57. table: "WXUser");
  58. migrationBuilder.DropColumn(
  59. name: "Nickname",
  60. table: "WXUser");
  61. migrationBuilder.DropColumn(
  62. name: "Province",
  63. table: "WXUser");
  64. migrationBuilder.DropColumn(
  65. name: "Sex",
  66. table: "WXUser");
  67. migrationBuilder.DropColumn(
  68. name: "UnionId",
  69. table: "WXUser");
  70. }
  71. }
  72. }