Remove 0.3 upgrade script.
Implement Clear Unassigned Card method to remove all cards/identifiers from the database not assigned to a user. Add procedure to delete cards from the db. #69
This commit is contained in:
parent
7a27bba95e
commit
b266fbf8e0
@ -63,6 +63,9 @@ namespace SQLiteRepository
|
||||
public const string GET_UNASSIGNED_CARD_LIST =
|
||||
"select * from " + nameof(CardUniqueId) + " where " + nameof(CardUniqueId.UserId_FK) + "=?";
|
||||
|
||||
public const string CLEAR_UNASSIGNED_CARDS =
|
||||
"delete from " + nameof(CardUniqueId) + " where " + nameof(CardUniqueId.UserId_FK) + "=?";
|
||||
|
||||
public const string UPDATE_CARD_USER_ID =
|
||||
"update " + nameof(CardUniqueId) + " set " + nameof(CardUniqueId.UserId_FK) + "=? where " +
|
||||
nameof(CardUniqueId.Id) + "=?";
|
||||
|
||||
@ -309,6 +309,13 @@ namespace SQLiteRepository
|
||||
return ret;
|
||||
}
|
||||
|
||||
public void ClearUnassignedIdentifiers()
|
||||
{
|
||||
_connection.Execute(
|
||||
SQLiteProcedures.CLEAR_UNASSIGNED_CARDS,
|
||||
Constants.UNASSIGNED_CARD_USER_ID);
|
||||
}
|
||||
|
||||
//TODO: Check time logs table on update to ensure associated cards/unique identifiers are removed/added as appropriate.
|
||||
public OperationResponse UpdateUser(User user, out int userIdResult)
|
||||
{
|
||||
|
||||
@ -77,7 +77,6 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AssemblyVersionInfo.cs" />
|
||||
<Compile Include="CardUniqueId.cs" />
|
||||
<Compile Include="DBVersion.cs" />
|
||||
<Compile Include="GroupDb.cs" />
|
||||
@ -107,9 +106,6 @@
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="UpgradeScripts\0.2.sql" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="UpgradeScripts\0.3.sql" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="..\packages\System.Data.SQLite.Core.1.0.104.0\build\net451\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.104.0\build\net451\System.Data.SQLite.Core.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user