using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace DW5S.Repostory.Migrations { /// public partial class init : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "CHECKRES", columns: table => new { ID = table.Column(type: "NUMBER(19)", nullable: false) .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), TASKID = table.Column(type: "NUMBER(10)", nullable: false), SIGTIME = table.Column(type: "NUMBER(10)", nullable: false), HTTPFILE = table.Column(type: "NVARCHAR2(2000)", nullable: true), POSCHECKTYPE = table.Column(type: "NUMBER(10)", nullable: true), SMPSTART = table.Column(type: "NUMBER(19)", nullable: false), SMPCOUNT = table.Column(type: "NUMBER(19)", nullable: false), USERNAME = table.Column(type: "NVARCHAR2(2000)", nullable: true), MODTYPE = table.Column(type: "NVARCHAR2(2000)", nullable: true), MODRATE = table.Column(type: "BINARY_DOUBLE", nullable: true), FFCHZ = table.Column(type: "BINARY_DOUBLE", nullable: true), SNR = table.Column(type: "BINARY_DOUBLE", nullable: true), CREATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), UPDATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_CHECKRES", x => x.ID); }); migrationBuilder.CreateTable( name: "CXRES", columns: table => new { ID = table.Column(type: "NUMBER(19)", nullable: false) .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), SIGTIME = table.Column(type: "TIMESTAMP(7)", nullable: false), FX = table.Column(type: "BINARY_DOUBLE", nullable: false), CREATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), UPDATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_CXRES", x => x.ID); }); migrationBuilder.CreateTable( name: "FIXEDSTATION", columns: table => new { ID = table.Column(type: "NUMBER(10)", nullable: false) .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), STATIONNAME = table.Column(type: "NVARCHAR2(50)", maxLength: 50, nullable: false), LON = table.Column(type: "BINARY_DOUBLE", nullable: false), LAT = table.Column(type: "BINARY_DOUBLE", nullable: false), FREQUPHZ = table.Column(type: "NUMBER(19)", nullable: false), VALUE = table.Column(type: "BINARY_DOUBLE", nullable: false), SPAREFIELD = table.Column(type: "BINARY_DOUBLE", nullable: false), ENABLE = table.Column(type: "NUMBER(1)", nullable: false), CREATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), UPDATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_FIXEDSTATION", x => x.ID); }); migrationBuilder.CreateTable( name: "LOGRES", columns: table => new { ID = table.Column(type: "NUMBER(19)", nullable: false) .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), MODULE = table.Column(type: "NVARCHAR2(450)", nullable: true), LOGTIME = table.Column(type: "TIMESTAMP(7)", nullable: false), LOGTYPE = table.Column(type: "NUMBER(10)", nullable: false), MSG = table.Column(type: "NVARCHAR2(2000)", nullable: true), CREATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), UPDATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_LOGRES", x => x.ID); }); migrationBuilder.CreateTable( name: "SATINFO", columns: table => new { ID = table.Column(type: "NUMBER(10)", nullable: false) .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), SATCODE = table.Column(type: "NUMBER(10)", nullable: false), SATNAME = table.Column(type: "NVARCHAR2(2000)", nullable: true), SATLON = table.Column(type: "BINARY_DOUBLE", nullable: true), SATTRANS = table.Column(type: "BINARY_DOUBLE", nullable: true), CREATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), UPDATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SATINFO", x => x.ID); }); migrationBuilder.CreateTable( name: "SIGDELAY", columns: table => new { ID = table.Column(type: "NUMBER(10)", nullable: false) .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), SIGINFOID = table.Column(type: "NUMBER(10)", nullable: false), SATINFOSATCODE = table.Column(type: "NUMBER(10)", nullable: false), SAT = table.Column(type: "NVARCHAR2(2000)", nullable: true), DELAY = table.Column(type: "BINARY_DOUBLE", nullable: false), CREATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), UPDATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SIGDELAY", x => x.ID); }); migrationBuilder.CreateTable( name: "SIGINFO", columns: table => new { ID = table.Column(type: "NUMBER(10)", nullable: false) .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), FREQUPHZ = table.Column(type: "NUMBER(19)", nullable: false), FREQDOWNHZ = table.Column(type: "NUMBER(19)", nullable: false), SIGTYPE = table.Column(type: "NUMBER(10)", nullable: false), SIGCHECKTYPE = table.Column(type: "NUMBER(10)", nullable: false), BAND = table.Column(type: "NUMBER(10)", nullable: false), FSHZ = table.Column(type: "NUMBER(10)", nullable: false), CREATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), UPDATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SIGINFO", x => x.ID); }); migrationBuilder.CreateTable( name: "STATIONRES", columns: table => new { ID = table.Column(type: "NUMBER(19)", nullable: false) .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), TASKID = table.Column(type: "NUMBER(10)", nullable: false), SATTXLON = table.Column(type: "BINARY_DOUBLE", nullable: false), SATTXLAT = table.Column(type: "BINARY_DOUBLE", nullable: false), CDBTXLON = table.Column(type: "BINARY_DOUBLE", nullable: true), CDBTXLAT = table.Column(type: "BINARY_DOUBLE", nullable: true), CXLON = table.Column(type: "BINARY_DOUBLE", nullable: true), CXLAT = table.Column(type: "BINARY_DOUBLE", nullable: true), REFNAME = table.Column(type: "NVARCHAR2(2000)", nullable: true), REFLON = table.Column(type: "BINARY_DOUBLE", nullable: true), REFLAT = table.Column(type: "BINARY_DOUBLE", nullable: true), FIXEDNAME = table.Column(type: "NVARCHAR2(2000)", nullable: true), FIXEDLON = table.Column(type: "BINARY_DOUBLE", nullable: true), FIXEDLAT = table.Column(type: "BINARY_DOUBLE", nullable: true), CREATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), UPDATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_STATIONRES", x => x.ID); }); migrationBuilder.CreateTable( name: "SYSSETINGS", columns: table => new { ID = table.Column(type: "NUMBER(10)", nullable: false) .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), TIMEZONEID = table.Column(type: "NVARCHAR2(2000)", nullable: true), TIMEZONEUTC = table.Column(type: "NVARCHAR2(2000)", nullable: true), TIMEZONENAME = table.Column(type: "NVARCHAR2(2000)", nullable: true), ZONEHOURS = table.Column(type: "BINARY_DOUBLE", nullable: false), HTTPPORT = table.Column(type: "NUMBER(10)", nullable: false), XLDIRECTORY = table.Column(type: "NVARCHAR2(2000)", nullable: true), SAMPLEDIRECTORY = table.Column(type: "NVARCHAR2(2000)", nullable: true), MAPTYPE = table.Column(type: "NUMBER(10)", nullable: false), WMTSSOURCE = table.Column(type: "NUMBER(10)", nullable: false), MAPLAYERTYPE = table.Column(type: "NUMBER(10)", nullable: false), CREATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), UPDATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SYSSETINGS", x => x.ID); }); migrationBuilder.CreateTable( name: "TARGETINFO", columns: table => new { ID = table.Column(type: "NUMBER(10)", nullable: false) .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), TARGETNAME = table.Column(type: "NVARCHAR2(2000)", nullable: true), TARGECOLOR = table.Column(type: "NVARCHAR2(2000)", nullable: true), CREATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), UPDATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_TARGETINFO", x => x.ID); }); migrationBuilder.CreateTable( name: "TASKINFO", columns: table => new { ID = table.Column(type: "NUMBER(10)", nullable: false) .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), TASKSTATE = table.Column(type: "NUMBER(10)", nullable: false), TASKNAME = table.Column(type: "NVARCHAR2(2000)", nullable: true), TASKSOURCETYPE = table.Column(type: "NUMBER(10)", nullable: false), TASKTYPE = table.Column(type: "NUMBER(10)", nullable: false), POSTYPE = table.Column(type: "NUMBER(10)", nullable: false), MAINSAT = table.Column(type: "NUMBER(10)", nullable: false), ADJA1SAT = table.Column(type: "NUMBER(10)", nullable: false), ADJA2SAT = table.Column(type: "NUMBER(10)", nullable: true), CREATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), UPDATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_TASKINFO", x => x.ID); }); migrationBuilder.CreateTable( name: "TASKRUNNNINGINFO", columns: table => new { ID = table.Column(type: "NUMBER(10)", nullable: false) .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), TASKID = table.Column(type: "NUMBER(10)", nullable: false), FREQUP = table.Column(type: "NUMBER(19)", nullable: false), LASTDONEADFILETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), CREATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), UPDATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_TASKRUNNNINGINFO", x => x.ID); }); migrationBuilder.CreateTable( name: "TXINFO", columns: table => new { ID = table.Column(type: "NUMBER(10)", nullable: false) .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), NAME = table.Column(type: "NVARCHAR2(50)", maxLength: 50, nullable: false), TXTYPE = table.Column(type: "NUMBER(10)", nullable: false), LON = table.Column(type: "BINARY_DOUBLE", nullable: false), LAT = table.Column(type: "BINARY_DOUBLE", nullable: false), ENABLE = table.Column(type: "NUMBER(1)", nullable: false), REMARK = table.Column(type: "NVARCHAR2(200)", maxLength: 200, nullable: true), CREATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), UPDATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_TXINFO", x => x.ID); }); migrationBuilder.CreateTable( name: "XLINFO", columns: table => new { ID = table.Column(type: "NUMBER(10)", nullable: false) .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), SATCODE = table.Column(type: "NUMBER(10)", nullable: false), SATNAME = table.Column(type: "NVARCHAR2(450)", nullable: true), TIMEUTC = table.Column(type: "TIMESTAMP(7)", nullable: false), LON = table.Column(type: "BINARY_DOUBLE", nullable: true), LINE1 = table.Column(type: "NVARCHAR2(2000)", nullable: true), LINE2 = table.Column(type: "NVARCHAR2(2000)", nullable: true), CREATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), UPDATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_XLINFO", x => x.ID); }); migrationBuilder.CreateTable( name: "CGRES", columns: table => new { ID = table.Column(type: "NUMBER(19)", nullable: false) .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), TASKID = table.Column(type: "NUMBER(10)", nullable: false), SIGTIME = table.Column(type: "TIMESTAMP(7)", nullable: false), SIGINFOID = table.Column(type: "NUMBER(10)", nullable: false), FREQUPHZ = table.Column(type: "NUMBER(19)", nullable: false), FREQDOWNHZ = table.Column(type: "NUMBER(19)", nullable: false), STATIONRESID = table.Column(type: "NUMBER(19)", nullable: false), CHECKRESID = table.Column(type: "NUMBER(19)", nullable: false), ADRESID1 = table.Column(type: "NUMBER(19)", nullable: false), ADRESID2 = table.Column(type: "NUMBER(19)", nullable: false), ADRESID3 = table.Column(type: "NUMBER(19)", nullable: true), MAINCODE = table.Column(type: "NUMBER(10)", nullable: false), ADJA1CODE = table.Column(type: "NUMBER(10)", nullable: false), ADJA2CODE = table.Column(type: "NUMBER(10)", nullable: true), DTO1 = table.Column(type: "BINARY_DOUBLE", nullable: false), DFO1 = table.Column(type: "BINARY_DOUBLE", nullable: false), SNR1 = table.Column(type: "BINARY_DOUBLE", nullable: false), DTO2 = table.Column(type: "BINARY_DOUBLE", nullable: true), DFO2 = table.Column(type: "BINARY_DOUBLE", nullable: true), SNR2 = table.Column(type: "BINARY_DOUBLE", nullable: true), REFYBDTO1 = table.Column(type: "BINARY_DOUBLE", nullable: true), REFYBDTO2 = table.Column(type: "BINARY_DOUBLE", nullable: true), MAINXLTIME = table.Column(type: "TIMESTAMP(7)", nullable: false), ADJA1XLTIME = table.Column(type: "TIMESTAMP(7)", nullable: true), MAINX = table.Column(type: "BINARY_DOUBLE", nullable: false), MAINY = table.Column(type: "BINARY_DOUBLE", nullable: false), MAINZ = table.Column(type: "BINARY_DOUBLE", nullable: false), ADJA1X = table.Column(type: "BINARY_DOUBLE", nullable: true), ADJA1Y = table.Column(type: "BINARY_DOUBLE", nullable: true), ADJA1Z = table.Column(type: "BINARY_DOUBLE", nullable: true), CREATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), UPDATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_CGRES", x => x.ID); table.ForeignKey( name: "FK_CGRES_CHECKRES_CHECKRESID", column: x => x.CHECKRESID, principalTable: "CHECKRES", principalColumn: "ID", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_CGRES_SIGINFO_SIGINFOID", column: x => x.SIGINFOID, principalTable: "SIGINFO", principalColumn: "ID", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_CGRES_STATIONRESID", column: x => x.STATIONRESID, principalTable: "STATIONRES", principalColumn: "ID", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "TASKSIG", columns: table => new { ID = table.Column(type: "NUMBER(10)", nullable: false) .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), TASKINFOID = table.Column(type: "NUMBER(10)", nullable: false), SIGINFOID = table.Column(type: "NUMBER(10)", nullable: false), FSHZ = table.Column(type: "NUMBER(19)", nullable: false), FREQUPHZ = table.Column(type: "NUMBER(19)", nullable: false), FREQDOWNHZ = table.Column(type: "NUMBER(19)", nullable: false), DTOCENTERUS = table.Column(type: "BINARY_FLOAT", nullable: false), DTORANGEUS = table.Column(type: "NUMBER(10)", nullable: false), SNR = table.Column(type: "NUMBER(10)", nullable: false), CREATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), UPDATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_TASKSIG", x => x.ID); table.ForeignKey( name: "FK_TASKSIG_SIGINFO_SIGINFOID", column: x => x.SIGINFOID, principalTable: "SIGINFO", principalColumn: "ID", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_TASKSIG_TASKINFO_TASKINFOID", column: x => x.TASKINFOID, principalTable: "TASKINFO", principalColumn: "ID", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "ADRES", columns: table => new { ID = table.Column(type: "NUMBER(19)", nullable: false) .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), HTTPFILE = table.Column(type: "NVARCHAR2(2000)", nullable: true), SIGTIME = table.Column(type: "TIMESTAMP(7)", nullable: false), FSHZ = table.Column(type: "NUMBER(10)", nullable: false), SATCODE = table.Column(type: "NUMBER(10)", nullable: false), FREQUPHZ = table.Column(type: "NUMBER(19)", nullable: false), FREQDOWNHZ = table.Column(type: "NUMBER(19)", nullable: false), CH = table.Column(type: "NUMBER(10)", nullable: false), FREQCENTER = table.Column(type: "NUMBER(19)", nullable: false), FILETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), FILESECONDS = table.Column(type: "BINARY_DOUBLE", nullable: false), FILESIZE = table.Column(type: "NUMBER(19)", nullable: false), REALFILECREATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), REALFILEUPDATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), REALFILESIZE = table.Column(type: "NUMBER(19)", nullable: false), RECTXINFOID = table.Column(type: "NUMBER(10)", nullable: false), RECSTATIONNAME = table.Column(type: "NVARCHAR2(2000)", nullable: true), FILEERRORMSG = table.Column(type: "NVARCHAR2(2000)", nullable: true), CREATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), UPDATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_ADRES", x => x.ID); table.ForeignKey( name: "FK_ADRES_TXINFO_RECTXINFOID", column: x => x.RECTXINFOID, principalTable: "TXINFO", principalColumn: "ID", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "REFCGRES", columns: table => new { ID = table.Column(type: "NUMBER(19)", nullable: false) .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), FILETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), FREQUPHZ = table.Column(type: "BINARY_DOUBLE", nullable: false), FREQDOWNHZ = table.Column(type: "BINARY_DOUBLE", nullable: false), SATINFOID = table.Column(type: "NUMBER(10)", nullable: false), REFTXINFOID = table.Column(type: "NUMBER(19)", nullable: false), REFTXINFOID1 = table.Column(type: "NUMBER(10)", nullable: true), YBDTO = table.Column(type: "BINARY_DOUBLE", nullable: false), YBDFO = table.Column(type: "BINARY_DOUBLE", nullable: false), YBSNR = table.Column(type: "BINARY_DOUBLE", nullable: false), CREATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), UPDATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_REFCGRES", x => x.ID); table.ForeignKey( name: "FK_REFCGRES_SATINFO_SATINFOID", column: x => x.SATINFOID, principalTable: "SATINFO", principalColumn: "ID", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_REFCGRES_TXINFO_REFTXINFOID", column: x => x.REFTXINFOID1, principalTable: "TXINFO", principalColumn: "ID"); }); migrationBuilder.CreateTable( name: "SAMPLEINFO", columns: table => new { ID = table.Column(type: "NUMBER(10)", nullable: false) .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), SAMPLENAME = table.Column(type: "NVARCHAR2(2000)", nullable: true), TXINFOID = table.Column(type: "NUMBER(10)", nullable: false), SIGINFOID = table.Column(type: "NUMBER(10)", nullable: false), FS = table.Column(type: "BINARY_DOUBLE", nullable: false), STARTSEC = table.Column(type: "NUMBER(10)", nullable: false), ENDSEC = table.Column(type: "NUMBER(10)", nullable: false), SAMPLEFILENAME = table.Column(type: "NVARCHAR2(2000)", nullable: true), SAMPLEPATH = table.Column(type: "NVARCHAR2(2000)", nullable: true), REMARK = table.Column(type: "NVARCHAR2(2000)", nullable: true), CREATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), UPDATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_SAMPLEINFO", x => x.ID); table.ForeignKey( name: "FK_SAMPLEINFO_SIGINFOID", column: x => x.SIGINFOID, principalTable: "SIGINFO", principalColumn: "ID", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_SAMPLEINFO_TXINFO_TXINFOID", column: x => x.TXINFOID, principalTable: "TXINFO", principalColumn: "ID", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "CGXGFRES", columns: table => new { ID = table.Column(type: "NUMBER(19)", nullable: false) .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), CGRESID = table.Column(type: "NUMBER(19)", nullable: false), CGTYPE = table.Column(type: "NUMBER(10)", nullable: false), SIGTIME = table.Column(type: "TIMESTAMP(7)", nullable: false), DTO = table.Column(type: "BINARY_DOUBLE", nullable: true), DFO = table.Column(type: "BINARY_DOUBLE", nullable: true), SNR = table.Column(type: "BINARY_DOUBLE", nullable: true), CREATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), UPDATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_CGXGFRES", x => x.ID); table.ForeignKey( name: "FK_CGXGFRES_CGRES_CGRESID", column: x => x.CGRESID, principalTable: "CGRES", principalColumn: "ID", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "POSRES", columns: table => new { ID = table.Column(type: "NUMBER(19)", nullable: false) .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), TASKID = table.Column(type: "NUMBER(10)", nullable: false), SIGINFOID = table.Column(type: "NUMBER(10)", nullable: false), FREQUPHZ = table.Column(type: "NUMBER(19)", nullable: false), FREQDOWNHZ = table.Column(type: "NUMBER(19)", nullable: false), SIGTIME = table.Column(type: "TIMESTAMP(7)", nullable: false), STATIONRESID = table.Column(type: "NUMBER(19)", nullable: false), CXRESID = table.Column(type: "NUMBER(19)", nullable: true), CGRESID = table.Column(type: "NUMBER(19)", nullable: false), TARGETINFOID = table.Column(type: "NUMBER(10)", nullable: true), CHECKRESID = table.Column(type: "NUMBER(19)", nullable: false), POSRESTYPE = table.Column(type: "NUMBER(10)", nullable: false), POSLON = table.Column(type: "BINARY_DOUBLE", nullable: false), POSLAT = table.Column(type: "BINARY_DOUBLE", nullable: false), MIRRLON = table.Column(type: "BINARY_DOUBLE", nullable: false), MIRRLAT = table.Column(type: "BINARY_DOUBLE", nullable: false), CONFIDENCE = table.Column(type: "NUMBER(10)", nullable: false), CREATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), UPDATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_POSRES", x => x.ID); table.ForeignKey( name: "FK_POSRES_CGRES_CGRESID", column: x => x.CGRESID, principalTable: "CGRES", principalColumn: "ID", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_POSRES_CHECKRES_CHECKRESID", column: x => x.CHECKRESID, principalTable: "CHECKRES", principalColumn: "ID", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_POSRES_CXRES_CXRESID", column: x => x.CXRESID, principalTable: "CXRES", principalColumn: "ID"); table.ForeignKey( name: "FK_POSRES_SIGINFO_SIGINFOID", column: x => x.SIGINFOID, principalTable: "SIGINFO", principalColumn: "ID", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_POSRES_STATIONRESID", column: x => x.STATIONRESID, principalTable: "STATIONRES", principalColumn: "ID", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_POSRES_TARGETINFOID", column: x => x.TARGETINFOID, principalTable: "TARGETINFO", principalColumn: "ID"); }); migrationBuilder.CreateTable( name: "REFTASKFREQ", columns: table => new { ID = table.Column(type: "NUMBER(19)", nullable: false) .Annotation("Oracle:Identity", "START WITH 1 INCREMENT BY 1"), SAMPLEINFOID = table.Column(type: "NUMBER(10)", nullable: false), SATINFOID = table.Column(type: "NUMBER(10)", nullable: false), CALCCYCLE = table.Column(type: "NUMBER(10)", nullable: false), SNR0 = table.Column(type: "NUMBER(10)", nullable: false), DTOCENTERUS = table.Column(type: "NUMBER(10)", nullable: false), DTORANGEUS = table.Column(type: "NUMBER(10)", nullable: false), DFORANGE = table.Column(type: "NUMBER(10)", nullable: false), SAMPLELEN = table.Column(type: "NUMBER(10)", nullable: false), ENABLE = table.Column(type: "NUMBER(1)", nullable: false), CREATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false), UPDATETIME = table.Column(type: "TIMESTAMP(7)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_REFTASKFREQ", x => x.ID); table.ForeignKey( name: "FK_REFTASKFREQ_SAMPLEINFOID", column: x => x.SAMPLEINFOID, principalTable: "SAMPLEINFO", principalColumn: "ID", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_REFTASKFREQ_SATINFOID", column: x => x.SATINFOID, principalTable: "SATINFO", principalColumn: "ID", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_ADRES_RECTXINFOID", table: "ADRES", column: "RECTXINFOID"); migrationBuilder.CreateIndex( name: "IX_ADRES_UPDATETIME", table: "ADRES", column: "UPDATETIME"); migrationBuilder.CreateIndex( name: "IX_CGRES_CHECKRESID", table: "CGRES", column: "CHECKRESID"); migrationBuilder.CreateIndex( name: "IX_CGRES_SIGINFOID", table: "CGRES", column: "SIGINFOID"); migrationBuilder.CreateIndex( name: "IX_CGRES_STATIONRESID", table: "CGRES", column: "STATIONRESID"); migrationBuilder.CreateIndex( name: "IX_CGRES_TASKID_TIME_FREQ", table: "CGRES", columns: new[] { "TASKID", "SIGTIME", "FREQUPHZ" }, descending: new[] { true, true, false }); migrationBuilder.CreateIndex( name: "IX_CGRES_UPDATETIME", table: "CGRES", column: "UPDATETIME"); migrationBuilder.CreateIndex( name: "IX_CGXGFRES_CGRESID", table: "CGXGFRES", column: "CGRESID"); migrationBuilder.CreateIndex( name: "IX_CGXGFRES_UPDATETIME", table: "CGXGFRES", column: "UPDATETIME"); migrationBuilder.CreateIndex( name: "IX_CHECKRES_TASKID_SIGTIME", table: "CHECKRES", columns: new[] { "TASKID", "SIGTIME" }, descending: new bool[0]); migrationBuilder.CreateIndex( name: "IX_CHECKRES_UPDATETIME", table: "CHECKRES", column: "UPDATETIME"); migrationBuilder.CreateIndex( name: "IX_CXRES_SIGTIME", table: "CXRES", column: "SIGTIME", descending: new bool[0]); migrationBuilder.CreateIndex( name: "IX_CXRES_UPDATETIME", table: "CXRES", column: "UPDATETIME"); migrationBuilder.CreateIndex( name: "IX_FIXEDSTATION_UPDATETIME", table: "FIXEDSTATION", column: "UPDATETIME"); migrationBuilder.CreateIndex( name: "IX_LOGRES_MODULE_TIME_TYPE", table: "LOGRES", columns: new[] { "MODULE", "LOGTIME", "LOGTYPE" }); migrationBuilder.CreateIndex( name: "IX_LOGRES_UPDATETIME", table: "LOGRES", column: "UPDATETIME"); migrationBuilder.CreateIndex( name: "IX_POSRES_CGRESID", table: "POSRES", column: "CGRESID"); migrationBuilder.CreateIndex( name: "IX_POSRES_CHECKRESID", table: "POSRES", column: "CHECKRESID"); migrationBuilder.CreateIndex( name: "IX_POSRES_CXRESID", table: "POSRES", column: "CXRESID"); migrationBuilder.CreateIndex( name: "IX_POSRES_SIGINFOID", table: "POSRES", column: "SIGINFOID"); migrationBuilder.CreateIndex( name: "IX_POSRES_STATIONRESID", table: "POSRES", column: "STATIONRESID", unique: true); migrationBuilder.CreateIndex( name: "IX_POSRES_TARGETINFOID", table: "POSRES", column: "TARGETINFOID", unique: true, filter: "\"TARGETINFOID\" IS NOT NULL"); migrationBuilder.CreateIndex( name: "IX_POSRES_TASKID_TIME_FREQ", table: "POSRES", columns: new[] { "TASKID", "SIGTIME", "FREQUPHZ" }, descending: new[] { true, true, false }); migrationBuilder.CreateIndex( name: "IX_POSRES_UPDATETIME", table: "POSRES", column: "UPDATETIME"); migrationBuilder.CreateIndex( name: "IX_REFCGRES_REFTXINFOID", table: "REFCGRES", column: "REFTXINFOID1"); migrationBuilder.CreateIndex( name: "IX_REFCGRES_SATINFOID", table: "REFCGRES", column: "SATINFOID"); migrationBuilder.CreateIndex( name: "IX_REFCGRES_TIME_FREQ_SNR", table: "REFCGRES", columns: new[] { "FILETIME", "FREQUPHZ", "YBSNR" }, descending: new[] { true, false, true }); migrationBuilder.CreateIndex( name: "IX_REFCGRES_UPDATETIME", table: "REFCGRES", column: "UPDATETIME"); migrationBuilder.CreateIndex( name: "IX_REFTASKFREQ_SAMPLEINFOID", table: "REFTASKFREQ", column: "SAMPLEINFOID", unique: true); migrationBuilder.CreateIndex( name: "IX_REFTASKFREQ_SATINFOID", table: "REFTASKFREQ", column: "SATINFOID", unique: true); migrationBuilder.CreateIndex( name: "IX_REFTASKFREQ_UPDATETIME", table: "REFTASKFREQ", column: "UPDATETIME"); migrationBuilder.CreateIndex( name: "IX_SAMPLEINFO_SIGINFOID", table: "SAMPLEINFO", column: "SIGINFOID", unique: true); migrationBuilder.CreateIndex( name: "IX_SAMPLEINFO_TXINFOID", table: "SAMPLEINFO", column: "TXINFOID"); migrationBuilder.CreateIndex( name: "IX_SAMPLEINFO_UPDATETIME", table: "SAMPLEINFO", column: "UPDATETIME"); migrationBuilder.CreateIndex( name: "IX_SATINFO_UPDATETIME", table: "SATINFO", column: "UPDATETIME"); migrationBuilder.CreateIndex( name: "IX_SIGDELAY_UPDATETIME", table: "SIGDELAY", column: "UPDATETIME"); migrationBuilder.CreateIndex( name: "IX_SIGINFO_UPDATETIME", table: "SIGINFO", column: "UPDATETIME"); migrationBuilder.CreateIndex( name: "IX_STATIONRES_UPDATETIME", table: "STATIONRES", column: "UPDATETIME"); migrationBuilder.CreateIndex( name: "IX_SYSSETINGS_UPDATETIME", table: "SYSSETINGS", column: "UPDATETIME"); migrationBuilder.CreateIndex( name: "IX_TARGETINFO_UPDATETIME", table: "TARGETINFO", column: "UPDATETIME"); migrationBuilder.CreateIndex( name: "IX_TASKINFO_UPDATETIME", table: "TASKINFO", column: "UPDATETIME"); migrationBuilder.CreateIndex( name: "IX_TASKRUNNNINGINFO_UPDATETIME", table: "TASKRUNNNINGINFO", column: "UPDATETIME"); migrationBuilder.CreateIndex( name: "IX_TASKSIG_SIGINFOID", table: "TASKSIG", column: "SIGINFOID"); migrationBuilder.CreateIndex( name: "IX_TASKSIG_TASKINFOID", table: "TASKSIG", column: "TASKINFOID"); migrationBuilder.CreateIndex( name: "IX_TASKSIG_UPDATETIME", table: "TASKSIG", column: "UPDATETIME"); migrationBuilder.CreateIndex( name: "IX_TXINFO_UPDATETIME", table: "TXINFO", column: "UPDATETIME"); migrationBuilder.CreateIndex( name: "IX_XLINFO_SATNAME_TIMEUTC_LON", table: "XLINFO", columns: new[] { "SATNAME", "TIMEUTC", "LON" }, descending: new[] { false, true, false }); migrationBuilder.CreateIndex( name: "IX_XLINFO_UPDATETIME", table: "XLINFO", column: "UPDATETIME"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "ADRES"); migrationBuilder.DropTable( name: "CGXGFRES"); migrationBuilder.DropTable( name: "FIXEDSTATION"); migrationBuilder.DropTable( name: "LOGRES"); migrationBuilder.DropTable( name: "POSRES"); migrationBuilder.DropTable( name: "REFCGRES"); migrationBuilder.DropTable( name: "REFTASKFREQ"); migrationBuilder.DropTable( name: "SIGDELAY"); migrationBuilder.DropTable( name: "SYSSETINGS"); migrationBuilder.DropTable( name: "TASKRUNNNINGINFO"); migrationBuilder.DropTable( name: "TASKSIG"); migrationBuilder.DropTable( name: "XLINFO"); migrationBuilder.DropTable( name: "CGRES"); migrationBuilder.DropTable( name: "CXRES"); migrationBuilder.DropTable( name: "TARGETINFO"); migrationBuilder.DropTable( name: "SAMPLEINFO"); migrationBuilder.DropTable( name: "SATINFO"); migrationBuilder.DropTable( name: "TASKINFO"); migrationBuilder.DropTable( name: "CHECKRES"); migrationBuilder.DropTable( name: "STATIONRES"); migrationBuilder.DropTable( name: "SIGINFO"); migrationBuilder.DropTable( name: "TXINFO"); } } }