mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Drop old admins table.
This commit is contained in:
1890
Cicm.Database/Migrations/20190519012635_DropOldAdminsTable.Designer.cs
generated
Normal file
1890
Cicm.Database/Migrations/20190519012635_DropOldAdminsTable.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,31 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace Cicm.Database.Migrations
|
||||||
|
{
|
||||||
|
public partial class DropOldAdminsTable : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable("admins");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable("admins",
|
||||||
|
table => new
|
||||||
|
{
|
||||||
|
id = table.Column<int>("int(11)")
|
||||||
|
.Annotation("MySql:ValueGenerationStrategy",
|
||||||
|
MySqlValueGenerationStrategy.IdentityColumn),
|
||||||
|
password =
|
||||||
|
table.Column<string>("char(50)", nullable: false,
|
||||||
|
defaultValueSql: "''"),
|
||||||
|
user = table.Column<string>("char(50)", nullable: false,
|
||||||
|
defaultValueSql: "''")
|
||||||
|
}, constraints: table => { table.PrimaryKey("PK_admins", x => x.id); });
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex("idx_admins_user", "admins", "user");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,23 +16,6 @@ namespace Cicm.Database.Migrations
|
|||||||
modelBuilder.HasAnnotation("ProductVersion", "2.2.4-servicing-10062")
|
modelBuilder.HasAnnotation("ProductVersion", "2.2.4-servicing-10062")
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
||||||
|
|
||||||
modelBuilder.Entity("Cicm.Database.Models.Admin", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)");
|
|
||||||
|
|
||||||
b.Property<string>("Password").IsRequired().ValueGeneratedOnAdd().HasColumnName("password")
|
|
||||||
.HasColumnType("char(50)").HasDefaultValueSql("''");
|
|
||||||
|
|
||||||
b.Property<string>("User").IsRequired().ValueGeneratedOnAdd().HasColumnName("user")
|
|
||||||
.HasColumnType("char(50)").HasDefaultValueSql("''");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("User").HasName("idx_admins_user");
|
|
||||||
|
|
||||||
b.ToTable("admins");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Cicm.Database.Models.BrowserTest", b =>
|
modelBuilder.Entity("Cicm.Database.Models.BrowserTest", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)");
|
b.Property<int>("Id").ValueGeneratedOnAdd().HasColumnName("id").HasColumnType("int(11)");
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
// Canary Islands Computer Museum Website
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
//
|
|
||||||
// Filename : Admin.cs
|
|
||||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
||||||
//
|
|
||||||
// --[ Description ] ----------------------------------------------------------
|
|
||||||
//
|
|
||||||
// Contains administrators.
|
|
||||||
//
|
|
||||||
// --[ 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-2018 Natalia Portillo
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
namespace Cicm.Database.Models
|
|
||||||
{
|
|
||||||
public class Admin
|
|
||||||
{
|
|
||||||
public int Id { get; set; }
|
|
||||||
public string User { get; set; }
|
|
||||||
public string Password { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -39,7 +39,6 @@ namespace Cicm.Database.Models
|
|||||||
|
|
||||||
public cicmContext(DbContextOptions<cicmContext> options) : base(options) { }
|
public cicmContext(DbContextOptions<cicmContext> options) : base(options) { }
|
||||||
|
|
||||||
public virtual DbSet<Admin> Admins { get; set; }
|
|
||||||
public virtual DbSet<BrowserTest> BrowserTests { get; set; }
|
public virtual DbSet<BrowserTest> BrowserTests { get; set; }
|
||||||
public virtual DbSet<CicmDb> CicmDb { get; set; }
|
public virtual DbSet<CicmDb> CicmDb { get; set; }
|
||||||
public virtual DbSet<Company> Companies { get; set; }
|
public virtual DbSet<Company> Companies { get; set; }
|
||||||
@@ -81,21 +80,6 @@ namespace Cicm.Database.Models
|
|||||||
{
|
{
|
||||||
base.OnModelCreating(modelBuilder);
|
base.OnModelCreating(modelBuilder);
|
||||||
|
|
||||||
modelBuilder.Entity<Admin>(entity =>
|
|
||||||
{
|
|
||||||
entity.ToTable("admins");
|
|
||||||
|
|
||||||
entity.HasIndex(e => e.User).HasName("idx_admins_user");
|
|
||||||
|
|
||||||
entity.Property(e => e.Id).HasColumnName("id").HasColumnType("int(11)");
|
|
||||||
|
|
||||||
entity.Property(e => e.Password).IsRequired().HasColumnName("password").HasColumnType("char(50)")
|
|
||||||
.HasDefaultValueSql("''");
|
|
||||||
|
|
||||||
entity.Property(e => e.User).IsRequired().HasColumnName("user").HasColumnType("char(50)")
|
|
||||||
.HasDefaultValueSql("''");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity<BrowserTest>(entity =>
|
modelBuilder.Entity<BrowserTest>(entity =>
|
||||||
{
|
{
|
||||||
entity.ToTable("browser_tests");
|
entity.ToTable("browser_tests");
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||||
<Version>3.0.99.456</Version>
|
<Version>3.0.99.458</Version>
|
||||||
<Company>Canary Islands Computer Museum</Company>
|
<Company>Canary Islands Computer Museum</Company>
|
||||||
<Copyright>Copyright © 2003-2018 Natalia Portillo</Copyright>
|
<Copyright>Copyright © 2003-2018 Natalia Portillo</Copyright>
|
||||||
<Product>Canary Islands Computer Museum Website</Product>
|
<Product>Canary Islands Computer Museum Website</Product>
|
||||||
|
|||||||
Reference in New Issue
Block a user