mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Rename database name.
This commit is contained in:
@@ -102,7 +102,7 @@ namespace Marechai.Database.Models
|
|||||||
if(optionsBuilder.IsConfigured) return;
|
if(optionsBuilder.IsConfigured) return;
|
||||||
|
|
||||||
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. See http://go.microsoft.com/fwlink/?LinkId=723263 for guidance on storing connection strings.
|
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. See http://go.microsoft.com/fwlink/?LinkId=723263 for guidance on storing connection strings.
|
||||||
optionsBuilder.UseMySql("server=localhost;port=3306;user=cicm;password=cicmpass;database=cicm");
|
optionsBuilder.UseMySql("server=localhost;port=3306;user=marechai;password=marechaipass;database=marechai");
|
||||||
optionsBuilder.UseLazyLoadingProxies();
|
optionsBuilder.UseLazyLoadingProxies();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2677,7 +2677,7 @@ namespace Marechai.Database
|
|||||||
|
|
||||||
Console.WriteLine("Adding Entity Framework first migration...");
|
Console.WriteLine("Adding Entity Framework first migration...");
|
||||||
dbCmd = dbCon.CreateCommand();
|
dbCmd = dbCon.CreateCommand();
|
||||||
dbCmd.CommandText = "INSERT INTO cicm.`__EFMigrationsHistory` (MigrationId, ProductVersion)" +
|
dbCmd.CommandText = "INSERT INTO marechai.`__EFMigrationsHistory` (MigrationId, ProductVersion)" +
|
||||||
" VALUES ('20180805214952_InitialMigration', '2.1.1-rtm-30846');";
|
" VALUES ('20180805214952_InitialMigration', '2.1.1-rtm-30846');";
|
||||||
dbCmd.ExecuteNonQuery();
|
dbCmd.ExecuteNonQuery();
|
||||||
dbCmd.Dispose();
|
dbCmd.Dispose();
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ namespace Marechai
|
|||||||
|
|
||||||
Console.WriteLine("\u001b[31;1mUpdating MySQL database without Entity Framework if it exists...\u001b[0m");
|
Console.WriteLine("\u001b[31;1mUpdating MySQL database without Entity Framework if it exists...\u001b[0m");
|
||||||
Database = new Mysql();
|
Database = new Mysql();
|
||||||
bool res = Database.OpenDb("localhost", "cicm", "cicm", "cicmpass", 3306);
|
bool res = Database.OpenDb("localhost", "marechai", "marechai", "marechaipass", 3306);
|
||||||
|
|
||||||
if(res)
|
if(res)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ namespace Marechai
|
|||||||
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. See http://go.microsoft.com/fwlink/?LinkId=723263 for guidance on storing connection strings.
|
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. See http://go.microsoft.com/fwlink/?LinkId=723263 for guidance on storing connection strings.
|
||||||
services.AddDbContext<MarechaiContext>(options => options
|
services.AddDbContext<MarechaiContext>(options => options
|
||||||
.UseLazyLoadingProxies()
|
.UseLazyLoadingProxies()
|
||||||
.UseMySql("server=localhost;port=3306;user=cicm;password=cicmpass;database=cicm;TreatTinyAsBoolean=false"));
|
.UseMySql("server=localhost;port=3306;user=marechai;password=marechaipass;database=marechai;TreatTinyAsBoolean=false"));
|
||||||
|
|
||||||
services.AddMvc();
|
services.AddMvc();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user