Posts

Showing posts with the label migration

Error on EF migration - Azure - MySql on App

Image
Clash Royale CLAN TAG #URR8PPP Error on EF migration - Azure - MySql on App I'm trying to run all pending migrations on my web app asp.net core 2.1 on Azure using MySql on App, free tier (always on not enabled) but I receive an error, as in the log file: "Microsoft.EntityFrameworkCore.Database.Connection: An error occurred using the connection to database '' on server '127.0.0.1:54184'" The mysql package I'm using is Pomelo.EntityFrameworkCore.MySql, version 2.1.1. I'm running this code in the Configure method of the Startup class: using (var serviceScope = app.ApplicationServices.GetRequiredService<IServiceScopeFactory>().CreateScope()) { using (var context = serviceScope.ServiceProvider.GetService<SandroDbContext>()) { context.Database.Migrate(); } } It seems to get the correct server and port from the environment variable for MySql in App , but not the database name. UPDATE: It doesn't work even if i remove th...

Sync Fabric with South

Image
Clash Royale CLAN TAG #URR8PPP Sync Fabric with South When i try execute a schemamigration with south with the following code: schemamigration # coding=utf-8 from fabric.api import env, hosts, local, run, cd def updatebd(): local('cd /Users/gian88/Sites/www/py/WEB/web/web/ && python manage.py schemamigration principal –-auto') When execute the fabric says the following error: Migration names should contain only alphanumeric characters and underscores. When use the sentences with cd , the command local not recognize the url in the sentences with cd and says the following error: with cd with cd can't open file 'manage.py': [Errno 2] No such file or directory Have you tried using with cd instead of && ? (docs) – alecxe Apr 25 '13 at 17:54 with ...