2024-11-18 14:22:09 +05:00
|
|
|
|
using System;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
2024-11-15 16:29:15 +05:00
|
|
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
|
|
|
|
namespace Persistence.Database.Postgres.Migrations
|
|
|
|
|
{
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
public partial class InitialCreate : Migration
|
|
|
|
|
{
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.AlterDatabase()
|
|
|
|
|
.Annotation("Npgsql:PostgresExtension:adminpack", ",,");
|
|
|
|
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
|
|
name: "DataSaub",
|
|
|
|
|
columns: table => new
|
|
|
|
|
{
|
|
|
|
|
id = table.Column<int>(type: "integer", nullable: false)
|
|
|
|
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
2024-11-18 14:22:09 +05:00
|
|
|
|
date = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
|
2024-11-15 16:29:15 +05:00
|
|
|
|
mode = table.Column<int>(type: "integer", nullable: true),
|
|
|
|
|
user = table.Column<string>(type: "text", nullable: true),
|
|
|
|
|
wellDepth = table.Column<double>(type: "double precision", nullable: true),
|
|
|
|
|
bitDepth = table.Column<double>(type: "double precision", nullable: true),
|
|
|
|
|
blockPosition = table.Column<double>(type: "double precision", nullable: true),
|
|
|
|
|
blockSpeed = table.Column<double>(type: "double precision", nullable: true),
|
|
|
|
|
pressure = table.Column<double>(type: "double precision", nullable: true),
|
|
|
|
|
axialLoad = table.Column<double>(type: "double precision", nullable: true),
|
|
|
|
|
hookWeight = table.Column<double>(type: "double precision", nullable: true),
|
|
|
|
|
rotorTorque = table.Column<double>(type: "double precision", nullable: true),
|
|
|
|
|
rotorSpeed = table.Column<double>(type: "double precision", nullable: true),
|
|
|
|
|
flow = table.Column<double>(type: "double precision", nullable: true),
|
|
|
|
|
mseState = table.Column<short>(type: "smallint", nullable: false),
|
|
|
|
|
idFeedRegulator = table.Column<int>(type: "integer", nullable: false),
|
|
|
|
|
mse = table.Column<double>(type: "double precision", nullable: true),
|
|
|
|
|
pump0Flow = table.Column<double>(type: "double precision", nullable: true),
|
|
|
|
|
pump1Flow = table.Column<double>(type: "double precision", nullable: true),
|
|
|
|
|
pump2Flow = table.Column<double>(type: "double precision", nullable: true)
|
|
|
|
|
},
|
|
|
|
|
constraints: table =>
|
|
|
|
|
{
|
|
|
|
|
table.PrimaryKey("PK_DataSaub", x => x.id);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
|
|
name: "DataSaub");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|