FsContext autoupdate check
This commit is contained in:
12
.idea/.idea.FoodsharingSiegen/.idea/dataSources.xml
generated
Normal file
12
.idea/.idea.FoodsharingSiegen/.idea/dataSources.xml
generated
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||||
|
<data-source source="LOCAL" name="app.db" uuid="00c330bf-190f-4c82-80a5-0daa1df5a15d">
|
||||||
|
<driver-ref>sqlite.xerial</driver-ref>
|
||||||
|
<synchronize>true</synchronize>
|
||||||
|
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
|
||||||
|
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/FoodsharingSiegen.Server/app.db</jdbc-url>
|
||||||
|
<working-dir>$ProjectFileDir$</working-dir>
|
||||||
|
</data-source>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -41,7 +41,7 @@ namespace FoodsharingSiegen.Server.Data
|
|||||||
/// <param name="options">The options (ab)</param>
|
/// <param name="options">The options (ab)</param>
|
||||||
public FsContext(DbContextOptions<FsContext> options) : base(options)
|
public FsContext(DbContextOptions<FsContext> options) : base(options)
|
||||||
{
|
{
|
||||||
Database.EnsureCreated();
|
Database.Migrate();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -57,11 +57,6 @@ namespace FoodsharingSiegen.Server.Data
|
|||||||
return ChangeTracker.Entries().Any(e => e.State is EntityState.Added or EntityState.Modified or EntityState.Deleted);
|
return ChangeTracker.Entries().Any(e => e.State is EntityState.Added or EntityState.Modified or EntityState.Deleted);
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AndresTestException : Exception
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user