Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
arsnova-click-v2-frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
ARSnova
arsnova-click-v2-frontend
Commits
392b98a8
Commit
392b98a8
authored
Dec 03, 2019
by
Christopher Fullarton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes db migration
parent
808bb8b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
app.db.ts
src/app/lib/db/app.db.ts
+14
-7
No files found.
src/app/lib/db/app.db.ts
View file @
392b98a8
...
...
@@ -11,18 +11,25 @@ export class AppDb extends Dexie {
constructor
(
dbName
:
DbName
)
{
super
(
dbName
);
this
.
version
(
1
).
stores
({
[
DbTable
.
Config
]:
'
type
'
,
[
DbTable
.
Quiz
]:
'
name
'
,
}).
upgrade
(
async
trans
=>
{
return
trans
.
db
.
delete
();
});
this
.
version
(
0.1
).
stores
({
[
DbTable
.
Config
]:
'
++id,&id
'
,
[
DbTable
.
Quiz
]:
'
++id,&id
'
,
});
this
.
version
(
0.2
)
.
stores
({
[
DbTable
.
Config
]:
null
,
[
DbTable
.
Quiz
]:
null
,
}).
upgrade
(
trans
=>
{
trans
.
idbtrans
.
db
.
deleteObjectStore
(
DbTable
.
Quiz
);
trans
.
idbtrans
.
db
.
deleteObjectStore
(
DbTable
.
Config
);
});
this
.
version
(
1
).
stores
({
[
DbTable
.
Config
]:
'
type
'
,
[
DbTable
.
Quiz
]:
'
name
'
,
});
this
.
Config
.
get
(
StorageKey
.
PrivateKey
).
then
(
privateKey
=>
{
if
(
privateKey
)
{
sessionStorage
.
setItem
(
StorageKey
.
PrivateKey
,
privateKey
.
value
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment