Add timestamps to ISO tables.

This commit is contained in:
2020-06-10 20:43:32 +01:00
parent 6d5f613252
commit ecc758d90d
10 changed files with 4416 additions and 2 deletions

View File

@@ -1,4 +1,29 @@
using System;
/******************************************************************************
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Marechai.Database.Migrations

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,70 @@
/******************************************************************************
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Marechai.Database.Migrations
{
public partial class AddTimestampsToIsoTables : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTime>("CreatedOn", "Iso4217", nullable: false).
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
migrationBuilder.AddColumn<DateTime>("UpdatedOn", "Iso4217", nullable: false).
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn);
migrationBuilder.AddColumn<DateTime>("CreatedOn", "iso3166_1_numeric", nullable: false).
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
migrationBuilder.AddColumn<DateTime>("UpdatedOn", "iso3166_1_numeric", nullable: false).
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn);
migrationBuilder.AddColumn<DateTime>("CreatedOn", "ISO_639-3", nullable: false).
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn);
migrationBuilder.AddColumn<DateTime>("UpdatedOn", "ISO_639-3", nullable: false).
Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.ComputedColumn);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn("CreatedOn", "Iso4217");
migrationBuilder.DropColumn("UpdatedOn", "Iso4217");
migrationBuilder.DropColumn("CreatedOn", "iso3166_1_numeric");
migrationBuilder.DropColumn("UpdatedOn", "iso3166_1_numeric");
migrationBuilder.DropColumn("CreatedOn", "ISO_639-3");
migrationBuilder.DropColumn("UpdatedOn", "ISO_639-3");
}
}
}

View File

@@ -803,9 +803,13 @@ namespace Marechai.Database.Migrations
{
b.Property<short>("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("smallint(3)");
b.Property<DateTime>("CreatedOn").ValueGeneratedOnAdd().HasColumnType("datetime(6)");
b.Property<string>("Name").IsRequired().HasColumnName("name").HasColumnType("varchar(64)").
HasMaxLength(64);
b.Property<DateTime>("UpdatedOn").ValueGeneratedOnAddOrUpdate().HasColumnType("datetime(6)");
b.HasKey("Id");
b.HasIndex("Name").HasName("idx_name");
@@ -817,6 +821,8 @@ namespace Marechai.Database.Migrations
{
b.Property<string>("Code").HasColumnType("varchar(3) CHARACTER SET utf8mb4").HasMaxLength(3);
b.Property<DateTime>("CreatedOn").ValueGeneratedOnAdd().HasColumnType("datetime(6)");
b.Property<byte?>("MinorUnits").HasColumnType("tinyint unsigned");
b.Property<string>("Name").IsRequired().HasColumnType("varchar(150) CHARACTER SET utf8mb4").
@@ -824,6 +830,8 @@ namespace Marechai.Database.Migrations
b.Property<short>("Numeric").HasColumnType("smallint(3)");
b.Property<DateTime>("UpdatedOn").ValueGeneratedOnAddOrUpdate().HasColumnType("datetime(6)");
b.Property<DateTime?>("Withdrawn").HasColumnType("datetime(6)");
b.HasKey("Code");
@@ -841,6 +849,8 @@ namespace Marechai.Database.Migrations
b.Property<string>("Comment").HasColumnType("varchar(150)");
b.Property<DateTime>("CreatedOn").ValueGeneratedOnAdd().HasColumnType("datetime(6)");
b.Property<string>("Part1").HasColumnType("char(2)");
b.Property<string>("Part2B").HasColumnType("char(3)");
@@ -854,6 +864,8 @@ namespace Marechai.Database.Migrations
b.Property<string>("Type").IsRequired().HasColumnType("char(1)");
b.Property<DateTime>("UpdatedOn").ValueGeneratedOnAddOrUpdate().HasColumnType("datetime(6)");
b.HasKey("Id");
b.HasIndex("Comment");