feat: add created_at and updated_at to wallets and accounts (#2177)
* feat: add `created_at` and `updated_at` to wallets and accounts the title says it all :) * fixup! * nitpicks :) * fixup! * sqlite fix * sqlite compat * fixup! * mypy * revert db py * motorinas suggestions * int(time()) proper default values in migration * uncomment migration * use now = int(time()) idiom to make code more readable also this fixes the issue where time() is called multiple times providing different return values for multiple invocations --------- Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
This commit is contained in:
@@ -91,6 +91,12 @@ class Compat:
|
||||
return "(strftime('%s', 'now'))"
|
||||
return "<nothing>"
|
||||
|
||||
@property
|
||||
def timestamp_column_default(self) -> str:
|
||||
if self.type in {POSTGRES, COCKROACH}:
|
||||
return self.timestamp_now
|
||||
return "NULL"
|
||||
|
||||
@property
|
||||
def serial_primary_key(self) -> str:
|
||||
if self.type in {POSTGRES, COCKROACH}:
|
||||
|
||||
Reference in New Issue
Block a user