20250212045952_Init.cs 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. #nullable disable
  4. namespace _04.DW5S.Repostory.Migrations
  5. {
  6. /// <inheritdoc />
  7. public partial class Init : Migration
  8. {
  9. /// <inheritdoc />
  10. protected override void Up(MigrationBuilder migrationBuilder)
  11. {
  12. migrationBuilder.CreateTable(
  13. name: "CheckRes",
  14. columns: table => new
  15. {
  16. ID = table.Column<long>(type: "NUMBER(19)", nullable: false)
  17. .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"),
  18. FILENAME = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true),
  19. POSCHECKTYPE = table.Column<int>(type: "NUMBER(10)", nullable: true),
  20. SMPSTART = table.Column<long>(type: "NUMBER(19)", nullable: true),
  21. SMPCOUNT = table.Column<long>(type: "NUMBER(19)", nullable: true),
  22. USERNAME = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true),
  23. MODTYPE = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true),
  24. MODRATE = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  25. FFCHZ = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  26. SNR = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  27. CREATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  28. UPDATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false)
  29. },
  30. constraints: table =>
  31. {
  32. table.PrimaryKey("PK_CHECKRES", x => x.ID);
  33. });
  34. migrationBuilder.CreateTable(
  35. name: "CxRes",
  36. columns: table => new
  37. {
  38. ID = table.Column<long>(type: "NUMBER(19)", nullable: false)
  39. .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"),
  40. SIGTIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  41. FX = table.Column<double>(type: "BINARY_DOUBLE", nullable: false),
  42. CREATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  43. UPDATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false)
  44. },
  45. constraints: table =>
  46. {
  47. table.PrimaryKey("PK_CXRES", x => x.ID);
  48. });
  49. migrationBuilder.CreateTable(
  50. name: "FIXEDSTATION",
  51. columns: table => new
  52. {
  53. ID = table.Column<int>(type: "NUMBER(10)", nullable: false)
  54. .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"),
  55. STATIONNAME = table.Column<string>(type: "NVARCHAR2(50)", maxLength: 50, nullable: false),
  56. LON = table.Column<double>(type: "BINARY_DOUBLE", nullable: false),
  57. LAT = table.Column<double>(type: "BINARY_DOUBLE", nullable: false),
  58. FREQUPHZ = table.Column<long>(type: "NUMBER(19)", nullable: false),
  59. VALUE = table.Column<double>(type: "BINARY_DOUBLE", nullable: false),
  60. SPAREFIELD = table.Column<double>(type: "BINARY_DOUBLE", nullable: false),
  61. ENABLE = table.Column<bool>(type: "NUMBER(1)", nullable: false),
  62. CREATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  63. UPDATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false)
  64. },
  65. constraints: table =>
  66. {
  67. table.PrimaryKey("PK_FIXEDSTATION", x => x.ID);
  68. });
  69. migrationBuilder.CreateTable(
  70. name: "LOGRES",
  71. columns: table => new
  72. {
  73. ID = table.Column<long>(type: "NUMBER(19)", nullable: false)
  74. .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"),
  75. MODULE = table.Column<string>(type: "NVARCHAR2(450)", nullable: true),
  76. LOGTIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  77. LOGTYPE = table.Column<int>(type: "NUMBER(10)", nullable: false),
  78. MSG = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true),
  79. CREATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  80. UPDATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false)
  81. },
  82. constraints: table =>
  83. {
  84. table.PrimaryKey("PK_LOGRES", x => x.ID);
  85. });
  86. migrationBuilder.CreateTable(
  87. name: "SATINFO",
  88. columns: table => new
  89. {
  90. ID = table.Column<int>(type: "NUMBER(10)", nullable: false)
  91. .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"),
  92. SATCODE = table.Column<int>(type: "NUMBER(10)", nullable: false),
  93. SATNAME = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true),
  94. SATLON = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  95. SATTRANS = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  96. CREATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  97. UPDATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false)
  98. },
  99. constraints: table =>
  100. {
  101. table.PrimaryKey("PK_SATINFO", x => x.ID);
  102. });
  103. migrationBuilder.CreateTable(
  104. name: "SIGINFO",
  105. columns: table => new
  106. {
  107. ID = table.Column<int>(type: "NUMBER(10)", nullable: false)
  108. .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"),
  109. FREQUP = table.Column<long>(type: "NUMBER(19)", nullable: false),
  110. FREQDOWN = table.Column<long>(type: "NUMBER(19)", nullable: false),
  111. SIGTYPE = table.Column<int>(type: "NUMBER(10)", nullable: false),
  112. SNR = table.Column<double>(type: "BINARY_DOUBLE", nullable: false),
  113. BAND = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  114. CREATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  115. UPDATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false)
  116. },
  117. constraints: table =>
  118. {
  119. table.PrimaryKey("PK_SIGINFO", x => x.ID);
  120. });
  121. migrationBuilder.CreateTable(
  122. name: "StationRes",
  123. columns: table => new
  124. {
  125. ID = table.Column<long>(type: "NUMBER(19)", nullable: false)
  126. .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"),
  127. TASKID = table.Column<int>(type: "NUMBER(10)", nullable: false),
  128. SATTXLON = table.Column<double>(type: "BINARY_DOUBLE", nullable: false),
  129. SATTXLAT = table.Column<double>(type: "BINARY_DOUBLE", nullable: false),
  130. CDBTXLON = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  131. CDBTXLAT = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  132. CXLON = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  133. CXLAT = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  134. REFLON = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  135. REFLAT = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  136. CREATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  137. UPDATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false)
  138. },
  139. constraints: table =>
  140. {
  141. table.PrimaryKey("PK_STATIONRES", x => x.ID);
  142. });
  143. migrationBuilder.CreateTable(
  144. name: "SysSetings",
  145. columns: table => new
  146. {
  147. ID = table.Column<int>(type: "NUMBER(10)", nullable: false)
  148. .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"),
  149. TIMEZONEID = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true),
  150. TIMEZONEUTC = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true),
  151. TIMEZONENAME = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true),
  152. ZONEHOURS = table.Column<double>(type: "BINARY_DOUBLE", nullable: false),
  153. HTTPPORT = table.Column<int>(type: "NUMBER(10)", nullable: false),
  154. XLDIRECTORY = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true),
  155. MAPTYPE = table.Column<int>(type: "NUMBER(10)", nullable: false),
  156. WMTSSOURCE = table.Column<int>(type: "NUMBER(10)", nullable: false),
  157. MAPLAYERTYPE = table.Column<int>(type: "NUMBER(10)", nullable: false),
  158. CREATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  159. UPDATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false)
  160. },
  161. constraints: table =>
  162. {
  163. table.PrimaryKey("PK_SYSSETINGS", x => x.ID);
  164. });
  165. migrationBuilder.CreateTable(
  166. name: "TARGETINFO",
  167. columns: table => new
  168. {
  169. ID = table.Column<int>(type: "NUMBER(10)", nullable: false)
  170. .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"),
  171. TARGETNAME = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true),
  172. TARGECOLOR = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true),
  173. CREATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  174. UPDATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false)
  175. },
  176. constraints: table =>
  177. {
  178. table.PrimaryKey("PK_TARGETINFO", x => x.ID);
  179. });
  180. migrationBuilder.CreateTable(
  181. name: "TASKINFO",
  182. columns: table => new
  183. {
  184. ID = table.Column<int>(type: "NUMBER(10)", nullable: false)
  185. .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"),
  186. TASKSTATE = table.Column<int>(type: "NUMBER(10)", nullable: false),
  187. TASKNAME = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true),
  188. TASKTYPE = table.Column<int>(type: "NUMBER(10)", nullable: false),
  189. POSTYPE = table.Column<int>(type: "NUMBER(10)", nullable: false),
  190. MAINSAT = table.Column<int>(type: "NUMBER(10)", nullable: false),
  191. ADJA1SAT = table.Column<int>(type: "NUMBER(10)", nullable: true),
  192. ADJA2SAT = table.Column<int>(type: "NUMBER(10)", nullable: true),
  193. CAPDIR = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true),
  194. CAPDIRFORMAT = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true),
  195. CREATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  196. UPDATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false)
  197. },
  198. constraints: table =>
  199. {
  200. table.PrimaryKey("PK_TASKINFO", x => x.ID);
  201. });
  202. migrationBuilder.CreateTable(
  203. name: "TASKRUNNNINGINFO",
  204. columns: table => new
  205. {
  206. ID = table.Column<int>(type: "NUMBER(10)", nullable: false)
  207. .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"),
  208. TASKID = table.Column<int>(type: "NUMBER(10)", nullable: false),
  209. FREQUP = table.Column<long>(type: "NUMBER(19)", nullable: false),
  210. LASTDONEADFILETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  211. CREATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  212. UPDATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false)
  213. },
  214. constraints: table =>
  215. {
  216. table.PrimaryKey("PK_TASKRUNNNINGINFO", x => x.ID);
  217. });
  218. migrationBuilder.CreateTable(
  219. name: "XLINFO",
  220. columns: table => new
  221. {
  222. ID = table.Column<int>(type: "NUMBER(10)", nullable: false)
  223. .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"),
  224. SATCODE = table.Column<int>(type: "NUMBER(10)", nullable: false),
  225. SATNAME = table.Column<string>(type: "NVARCHAR2(450)", nullable: true),
  226. TIMEUTC = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  227. LON = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  228. LINE1 = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true),
  229. LINE2 = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true),
  230. CREATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  231. UPDATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false)
  232. },
  233. constraints: table =>
  234. {
  235. table.PrimaryKey("PK_XLINFO", x => x.ID);
  236. });
  237. migrationBuilder.CreateTable(
  238. name: "TXINFO",
  239. columns: table => new
  240. {
  241. ID = table.Column<int>(type: "NUMBER(10)", nullable: false)
  242. .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"),
  243. NAME = table.Column<string>(type: "NVARCHAR2(50)", maxLength: 50, nullable: false),
  244. TXTYPE = table.Column<int>(type: "NUMBER(10)", nullable: false),
  245. LON = table.Column<double>(type: "BINARY_DOUBLE", nullable: false),
  246. LAT = table.Column<double>(type: "BINARY_DOUBLE", nullable: false),
  247. SATINFOID = table.Column<int>(type: "NUMBER(10)", nullable: true),
  248. ENABLE = table.Column<bool>(type: "NUMBER(1)", nullable: false),
  249. REMARK = table.Column<string>(type: "NVARCHAR2(200)", maxLength: 200, nullable: true),
  250. CREATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  251. UPDATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false)
  252. },
  253. constraints: table =>
  254. {
  255. table.PrimaryKey("PK_TXINFO", x => x.ID);
  256. table.ForeignKey(
  257. name: "FK_TXINFO_SATINFOID",
  258. column: x => x.SATINFOID,
  259. principalTable: "SATINFO",
  260. principalColumn: "ID");
  261. });
  262. migrationBuilder.CreateTable(
  263. name: "SIGDELAY",
  264. columns: table => new
  265. {
  266. ID = table.Column<int>(type: "NUMBER(10)", nullable: false)
  267. .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"),
  268. SIGINFOID = table.Column<int>(type: "NUMBER(10)", nullable: false),
  269. SATINFOSATCODE = table.Column<int>(type: "NUMBER(10)", nullable: false),
  270. SAT = table.Column<string>(type: "NVARCHAR2(2000)", nullable: true),
  271. SATINFOID = table.Column<int>(type: "NUMBER(10)", nullable: true),
  272. DELAY = table.Column<double>(type: "BINARY_DOUBLE", nullable: false),
  273. CREATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  274. UPDATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false)
  275. },
  276. constraints: table =>
  277. {
  278. table.PrimaryKey("PK_SIGDELAY", x => x.ID);
  279. table.ForeignKey(
  280. name: "FK_SIGDELAY_SATINFOID",
  281. column: x => x.SATINFOID,
  282. principalTable: "SATINFO",
  283. principalColumn: "ID");
  284. table.ForeignKey(
  285. name: "FK_SIGDELAY_SIGINFOID",
  286. column: x => x.SIGINFOID,
  287. principalTable: "SIGINFO",
  288. principalColumn: "ID",
  289. onDelete: ReferentialAction.Cascade);
  290. });
  291. migrationBuilder.CreateTable(
  292. name: "CgRes",
  293. columns: table => new
  294. {
  295. ID = table.Column<long>(type: "NUMBER(19)", nullable: false)
  296. .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"),
  297. SIGTIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  298. STATIONRESID = table.Column<long>(type: "NUMBER(19)", nullable: false),
  299. TASKID = table.Column<int>(type: "NUMBER(10)", nullable: false),
  300. FIXEDSTATIONID = table.Column<int>(type: "NUMBER(10)", nullable: true),
  301. DTO1 = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  302. DFO1 = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  303. SNR1 = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  304. DTO2 = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  305. DFO2 = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  306. SNR2 = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  307. DTOCDB = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  308. DFOCDB = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  309. SNRCDB = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  310. YBMAINDTO = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  311. YBMAINDFO = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  312. YBMAINSNR = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  313. YBADJA1DTO = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  314. YBADJA1DFO = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  315. YBADJA1SNR = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  316. YBADJA2DTO = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  317. YBADJA2DFO = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  318. YBADJA2SNR = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  319. TARFREQUP = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  320. TARFREQDOWN = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  321. REFFREQUP = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  322. REFFREQDOWN = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  323. MAINCODE = table.Column<int>(type: "NUMBER(10)", nullable: true),
  324. ADJA1CODE = table.Column<int>(type: "NUMBER(10)", nullable: true),
  325. ADJA2CODE = table.Column<int>(type: "NUMBER(10)", nullable: true),
  326. MAINXLTIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: true),
  327. ADJA1XLTIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: true),
  328. ADJA2XLTIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: true),
  329. MAINX = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  330. MAINY = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  331. MAINZ = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  332. MAINVX = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  333. MAINVY = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  334. MAINVZ = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  335. ADJA1X = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  336. ADJA1Y = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  337. ADJA1Z = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  338. ADJA1VX = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  339. ADJA1VY = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  340. ADJA1VZ = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  341. ADJA2X = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  342. ADJA2Y = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  343. ADJA2Z = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  344. ADJA2VX = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  345. ADJA2VY = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  346. ADJA2VZ = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  347. CREATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  348. UPDATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false)
  349. },
  350. constraints: table =>
  351. {
  352. table.PrimaryKey("PK_CGRES", x => x.ID);
  353. table.ForeignKey(
  354. name: "FK_CGRES_FIXEDSTATIONID",
  355. column: x => x.FIXEDSTATIONID,
  356. principalTable: "FIXEDSTATION",
  357. principalColumn: "ID");
  358. table.ForeignKey(
  359. name: "FK_CGRES_STATIONRESID",
  360. column: x => x.STATIONRESID,
  361. principalTable: "StationRes",
  362. principalColumn: "ID",
  363. onDelete: ReferentialAction.Cascade);
  364. });
  365. migrationBuilder.CreateTable(
  366. name: "TASKSIG",
  367. columns: table => new
  368. {
  369. ID = table.Column<int>(type: "NUMBER(10)", nullable: false)
  370. .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"),
  371. TASKINFOID = table.Column<int>(type: "NUMBER(10)", nullable: false),
  372. SIGINFOID = table.Column<int>(type: "NUMBER(10)", nullable: false),
  373. FREQUP = table.Column<long>(type: "NUMBER(19)", nullable: false),
  374. FREQDOWN = table.Column<long>(type: "NUMBER(19)", nullable: false),
  375. CREATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  376. UPDATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false)
  377. },
  378. constraints: table =>
  379. {
  380. table.PrimaryKey("PK_TASKSIG", x => x.ID);
  381. table.ForeignKey(
  382. name: "FK_TASKSIG_SIGINFOID",
  383. column: x => x.SIGINFOID,
  384. principalTable: "SIGINFO",
  385. principalColumn: "ID",
  386. onDelete: ReferentialAction.Cascade);
  387. table.ForeignKey(
  388. name: "FK_TASKSIG_TASKINFOID",
  389. column: x => x.TASKINFOID,
  390. principalTable: "TASKINFO",
  391. principalColumn: "ID",
  392. onDelete: ReferentialAction.Cascade);
  393. });
  394. migrationBuilder.CreateTable(
  395. name: "CgXgfRes",
  396. columns: table => new
  397. {
  398. ID = table.Column<long>(type: "NUMBER(19)", nullable: false)
  399. .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"),
  400. CGRESID = table.Column<long>(type: "NUMBER(19)", nullable: false),
  401. CGTYPE = table.Column<int>(type: "NUMBER(10)", nullable: false),
  402. SIGTIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  403. DTO = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  404. DFO = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  405. SNR = table.Column<double>(type: "BINARY_DOUBLE", nullable: true),
  406. CREATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  407. UPDATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false)
  408. },
  409. constraints: table =>
  410. {
  411. table.PrimaryKey("PK_CGXGFRES", x => x.ID);
  412. table.ForeignKey(
  413. name: "FK_CGXGFRES_CGRESID",
  414. column: x => x.CGRESID,
  415. principalTable: "CgRes",
  416. principalColumn: "ID",
  417. onDelete: ReferentialAction.Cascade);
  418. });
  419. migrationBuilder.CreateTable(
  420. name: "PosRes",
  421. columns: table => new
  422. {
  423. ID = table.Column<long>(type: "NUMBER(19)", nullable: false)
  424. .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"),
  425. TASKINFOID = table.Column<int>(type: "NUMBER(10)", nullable: false),
  426. FREQUPHZ = table.Column<long>(type: "NUMBER(19)", nullable: false),
  427. STATIONRESID = table.Column<long>(type: "NUMBER(19)", nullable: false),
  428. CXRESID = table.Column<long>(type: "NUMBER(19)", nullable: true),
  429. CGRESID = table.Column<long>(type: "NUMBER(19)", nullable: false),
  430. TARGETINFOID = table.Column<int>(type: "NUMBER(10)", nullable: true),
  431. CHECKRESID = table.Column<long>(type: "NUMBER(19)", nullable: true),
  432. POSRESTYPE = table.Column<int>(type: "NUMBER(10)", nullable: false),
  433. TARGETSTATE = table.Column<int>(type: "NUMBER(10)", nullable: false),
  434. CREATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  435. UPDATETIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  436. SIGTIME = table.Column<DateTime>(type: "TIMESTAMP(7)", nullable: false),
  437. POSLON = table.Column<double>(type: "BINARY_DOUBLE", nullable: false),
  438. POSLAT = table.Column<double>(type: "BINARY_DOUBLE", nullable: false),
  439. MIRRLON = table.Column<double>(type: "BINARY_DOUBLE", nullable: false),
  440. MIRRLAT = table.Column<double>(type: "BINARY_DOUBLE", nullable: false),
  441. CONFIDENCE = table.Column<int>(type: "NUMBER(10)", nullable: false)
  442. },
  443. constraints: table =>
  444. {
  445. table.PrimaryKey("PK_POSRES", x => x.ID);
  446. table.ForeignKey(
  447. name: "FK_POSRES_CGRESID",
  448. column: x => x.CGRESID,
  449. principalTable: "CgRes",
  450. principalColumn: "ID",
  451. onDelete: ReferentialAction.Cascade);
  452. table.ForeignKey(
  453. name: "FK_POSRES_CHECKRESID",
  454. column: x => x.CHECKRESID,
  455. principalTable: "CheckRes",
  456. principalColumn: "ID");
  457. table.ForeignKey(
  458. name: "FK_POSRES_CXRESID",
  459. column: x => x.CXRESID,
  460. principalTable: "CxRes",
  461. principalColumn: "ID");
  462. table.ForeignKey(
  463. name: "FK_POSRES_STATIONRESID",
  464. column: x => x.STATIONRESID,
  465. principalTable: "StationRes",
  466. principalColumn: "ID",
  467. onDelete: ReferentialAction.Cascade);
  468. });
  469. migrationBuilder.CreateIndex(
  470. name: "IX_CGRES_FIXEDSTATIONID",
  471. table: "CgRes",
  472. column: "FIXEDSTATIONID");
  473. migrationBuilder.CreateIndex(
  474. name: "IX_CGRES_STATIONRESID",
  475. table: "CgRes",
  476. column: "STATIONRESID");
  477. migrationBuilder.CreateIndex(
  478. name: "IX_CGRES_UPDATETIME",
  479. table: "CgRes",
  480. column: "UPDATETIME");
  481. migrationBuilder.CreateIndex(
  482. name: "IX_CGXGFRES_CGRESID",
  483. table: "CgXgfRes",
  484. column: "CGRESID");
  485. migrationBuilder.CreateIndex(
  486. name: "IX_CGXGFRES_UPDATETIME",
  487. table: "CgXgfRes",
  488. column: "UPDATETIME");
  489. migrationBuilder.CreateIndex(
  490. name: "IX_CHECKRES_UPDATETIME",
  491. table: "CheckRes",
  492. column: "UPDATETIME");
  493. migrationBuilder.CreateIndex(
  494. name: "IX_CXRES_UPDATETIME",
  495. table: "CxRes",
  496. column: "UPDATETIME");
  497. migrationBuilder.CreateIndex(
  498. name: "IX_FIXEDSTATION_UPDATETIME",
  499. table: "FIXEDSTATION",
  500. column: "UPDATETIME");
  501. migrationBuilder.CreateIndex(
  502. name: "IX_LOGRES_MODULE_TIME_TYPE",
  503. table: "LOGRES",
  504. columns: new[] { "MODULE", "LOGTIME", "LOGTYPE" });
  505. migrationBuilder.CreateIndex(
  506. name: "IX_LOGRES_UPDATETIME",
  507. table: "LOGRES",
  508. column: "UPDATETIME");
  509. migrationBuilder.CreateIndex(
  510. name: "IX_POSRES_CGRESID",
  511. table: "PosRes",
  512. column: "CGRESID");
  513. migrationBuilder.CreateIndex(
  514. name: "IX_POSRES_CHECKRESID",
  515. table: "PosRes",
  516. column: "CHECKRESID");
  517. migrationBuilder.CreateIndex(
  518. name: "IX_POSRES_CXRESID",
  519. table: "PosRes",
  520. column: "CXRESID");
  521. migrationBuilder.CreateIndex(
  522. name: "IX_POSRES_STATIONRESID",
  523. table: "PosRes",
  524. column: "STATIONRESID");
  525. migrationBuilder.CreateIndex(
  526. name: "IX_POSRES_UPDATETIME",
  527. table: "PosRes",
  528. column: "UPDATETIME");
  529. migrationBuilder.CreateIndex(
  530. name: "IX_SATINFO_UPDATETIME",
  531. table: "SATINFO",
  532. column: "UPDATETIME");
  533. migrationBuilder.CreateIndex(
  534. name: "IX_SIGDELAY_SATINFOID",
  535. table: "SIGDELAY",
  536. column: "SATINFOID");
  537. migrationBuilder.CreateIndex(
  538. name: "IX_SIGDELAY_SIGINFOID",
  539. table: "SIGDELAY",
  540. column: "SIGINFOID");
  541. migrationBuilder.CreateIndex(
  542. name: "IX_SIGDELAY_UPDATETIME",
  543. table: "SIGDELAY",
  544. column: "UPDATETIME");
  545. migrationBuilder.CreateIndex(
  546. name: "IX_SIGINFO_UPDATETIME",
  547. table: "SIGINFO",
  548. column: "UPDATETIME");
  549. migrationBuilder.CreateIndex(
  550. name: "IX_STATIONRES_UPDATETIME",
  551. table: "StationRes",
  552. column: "UPDATETIME");
  553. migrationBuilder.CreateIndex(
  554. name: "IX_SYSSETINGS_UPDATETIME",
  555. table: "SysSetings",
  556. column: "UPDATETIME");
  557. migrationBuilder.CreateIndex(
  558. name: "IX_TARGETINFO_UPDATETIME",
  559. table: "TARGETINFO",
  560. column: "UPDATETIME");
  561. migrationBuilder.CreateIndex(
  562. name: "IX_TASKINFO_UPDATETIME",
  563. table: "TASKINFO",
  564. column: "UPDATETIME");
  565. migrationBuilder.CreateIndex(
  566. name: "IX_TASKRUN_UPDATETIME",
  567. table: "TASKRUNNNINGINFO",
  568. column: "UPDATETIME");
  569. migrationBuilder.CreateIndex(
  570. name: "IX_TASKSIG_SIGINFOID",
  571. table: "TASKSIG",
  572. column: "SIGINFOID");
  573. migrationBuilder.CreateIndex(
  574. name: "IX_TASKSIG_TASKINFOID",
  575. table: "TASKSIG",
  576. column: "TASKINFOID");
  577. migrationBuilder.CreateIndex(
  578. name: "IX_TASKSIG_UPDATETIME",
  579. table: "TASKSIG",
  580. column: "UPDATETIME");
  581. migrationBuilder.CreateIndex(
  582. name: "IX_TXINFO_SATINFOID",
  583. table: "TXINFO",
  584. column: "SATINFOID");
  585. migrationBuilder.CreateIndex(
  586. name: "IX_TXINFO_UPDATETIME",
  587. table: "TXINFO",
  588. column: "UPDATETIME");
  589. migrationBuilder.CreateIndex(
  590. name: "IX_XLINFO_SATNAME_TIMEUTC_LON",
  591. table: "XLINFO",
  592. columns: new[] { "SATNAME", "TIMEUTC", "LON" });
  593. migrationBuilder.CreateIndex(
  594. name: "IX_XLINFO_UPDATETIME",
  595. table: "XLINFO",
  596. column: "UPDATETIME");
  597. }
  598. /// <inheritdoc />
  599. protected override void Down(MigrationBuilder migrationBuilder)
  600. {
  601. migrationBuilder.DropTable(
  602. name: "CgXgfRes");
  603. migrationBuilder.DropTable(
  604. name: "LOGRES");
  605. migrationBuilder.DropTable(
  606. name: "PosRes");
  607. migrationBuilder.DropTable(
  608. name: "SIGDELAY");
  609. migrationBuilder.DropTable(
  610. name: "SysSetings");
  611. migrationBuilder.DropTable(
  612. name: "TARGETINFO");
  613. migrationBuilder.DropTable(
  614. name: "TASKRUNNNINGINFO");
  615. migrationBuilder.DropTable(
  616. name: "TASKSIG");
  617. migrationBuilder.DropTable(
  618. name: "TXINFO");
  619. migrationBuilder.DropTable(
  620. name: "XLINFO");
  621. migrationBuilder.DropTable(
  622. name: "CgRes");
  623. migrationBuilder.DropTable(
  624. name: "CheckRes");
  625. migrationBuilder.DropTable(
  626. name: "CxRes");
  627. migrationBuilder.DropTable(
  628. name: "SIGINFO");
  629. migrationBuilder.DropTable(
  630. name: "TASKINFO");
  631. migrationBuilder.DropTable(
  632. name: "SATINFO");
  633. migrationBuilder.DropTable(
  634. name: "FIXEDSTATION");
  635. migrationBuilder.DropTable(
  636. name: "StationRes");
  637. }
  638. }
  639. }