Closed bromagosa closed 5 years ago
Can we name the column deleted_at
? Otherwise, it seems like deleted
is probably a boolean.
Hmm, we can, but I was just following the same names as created
, lastshared
, etc.
I think we should name those with _at
too. Especially since there's some useful features in lapis: http://leafo.net/lapis/reference/models.html#timestamps
Agreed. I'll close this one though, as it's already implemented in 78679cc. We can rename these columns later :)
I'm amazed at how easy it was to do this, by the way. Views are very useful.
Views are indeed cool! I really like that solution.
Michael Ball | michaelball.co UC Berkeley Computer Science BA '15, MS '16 gradescope.com | bjc.berkeley.edu
On Mon, Jan 14, 2019 at 2:56 AM Bernat Romagosa notifications@github.com wrote:
Agreed. I'll close this one though, as it's already implemented in 78679cc https://github.com/bromagosa/snapCloud/commit/78679cc4d71418b78351b8f225ae97948bafde77. We can rename these columns later :)
I'm amazed at how easy it was to do this, by the way. Views are very useful.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bromagosa/snapCloud/issues/169#issuecomment-453966153, or mute the thread https://github.com/notifications/unsubscribe-auth/ABb6c1m42cWMe27UUGMLHpoRjcW7eHujks5vDGJAgaJpZM4Z99sf .
I've decided to add a
deleted
timestamp column. I've been running some benchmarks in staging and it doesn't add too much overhead to test whether an additional column isnull
. We could even create a view that filters deleted projects automatically and always query from that one except when specifically looking for deleted projects:create view active_projects as select * from projects where deleted is null;
create view deleted_projects as select * from projects where deleted is not null;
This will make it much easier for remixes, as it won't break any existing relationships.