Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add data refresher, remote storage database toggle #156

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

civsiv
Copy link
Contributor

@civsiv civsiv commented Jul 14, 2021

Soft delete:
Screenshot 2021-07-15 at 14 55 06
New data at edge of window:
Screenshot 2021-07-15 at 14 55 29

Copy link
Contributor

@nickevansuk nickevansuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a first pass at this, having not got into the detail of what might be causing the problem, the CI issues point to an issue with database initialisation.

If the tables are wiped or not initialised on startup then the auth will fail (which happens in some cases), and if the tables are wiped then there will be no sessions in the database (which happens in other cases).

Can do a deeper investigation, however thought worth bouncing this back first now that CI is fixed? Should be possible to reproduce this locally by running both projects in SQLite mode and starting one and then the other in either order.

Comment on lines 51 to 84
db.CreateTable<GrantTable>();
db.CreateTable<BookingPartnerTable>();
db.CreateTable<SellerTable>();
db.CreateTable<ClassTable>();
db.CreateTable<OrderTable>();
db.CreateTable<OccurrenceTable>();
db.CreateTable<FacilityUseTable>();
db.CreateTable<SlotTable>();
db.CreateTable<OrderItemsTable>();
db.CreateTable<SellerUserTable>();
}
else
{
if (!db.TableExists<GrantTable>())
db.CreateTable<GrantTable>();
if (!db.TableExists<BookingPartnerTable>())
db.CreateTable<BookingPartnerTable>();
if (!db.TableExists<SellerTable>())
db.CreateTable<SellerTable>();
if (!db.TableExists<ClassTable>())
db.CreateTable<ClassTable>();
if (!db.TableExists<OrderTable>())
db.CreateTable<OrderTable>();
if (!db.TableExists<OccurrenceTable>())
db.CreateTable<OccurrenceTable>();
if (!db.TableExists<FacilityUseTable>())
db.CreateTable<FacilityUseTable>();
if (!db.TableExists<SlotTable>())
db.CreateTable<SlotTable>();
if (!db.TableExists<OrderItemsTable>())
db.CreateTable<OrderItemsTable>();
if (!db.TableExists<SellerUserTable>())
db.CreateTable<SellerUserTable>();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can use db.CreateTableIfNotExists<>(); here to simplify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants