vendrcontrib / vendr-wishlists

[WIP] Wishlists for Vendr, the eCommerce solution for Umbraco v8+
MIT License
0 stars 1 forks source link

[Discussion] What should the Migrations table look like? #2

Open NikRimington opened 4 years ago

NikRimington commented 4 years ago

I think the current definition of the migrations table is good, although I believe it is missing a key element.

As "orders" are essentially going to store the main details of a wishlist, we need to tie it back to the order so the addition of an orderId column is important for wishlists to work.

bjarnef commented 4 years ago

@NikRimington anything you think is missing in the later changes where the migration has an orderId column?

NikRimington commented 4 years ago

Good question, do you think we need to have a delayed flag or should we allow them to be fully deleted?

bjarnef commented 4 years ago

Do you mean soft-deleted entities like in UCommerce where the entities are "deleted" in backoffice but still available in database marked with deleted = 1.

At the moment I think Vendr is consistent with Umbraco, so when deleted it is gone forever? @mattbrailsford

mattbrailsford commented 4 years ago

Only orders are deleted forever. Store entities are soft deleted.

bjarnef commented 4 years ago

I guess wishlists should not be soft deleted then like reviews? :)

mattbrailsford commented 4 years ago

In Vendr, we have a deleted time stamp as then we can do things like enforce unique names with a unique constraint whilst still allowing soft deletes (ie, if it was a deleted bool, you could only have one deleted entity with a given name)