Drop old admins table.

This commit is contained in:
2019-05-19 02:33:59 +01:00
parent d2156aaf90
commit 1ccaac44da
6 changed files with 1922 additions and 73 deletions

View File

@@ -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; }
}
}

View File

@@ -39,7 +39,6 @@ namespace Cicm.Database.Models
public cicmContext(DbContextOptions<cicmContext> options) : base(options) { }
public virtual DbSet<Admin> Admins { get; set; }
public virtual DbSet<BrowserTest> BrowserTests { get; set; }
public virtual DbSet<CicmDb> CicmDb { get; set; }
public virtual DbSet<Company> Companies { get; set; }
@@ -81,21 +80,6 @@ namespace Cicm.Database.Models
{
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 =>
{
entity.ToTable("browser_tests");