mirror of
https://github.com/yweber/lodel2.git
synced 2026-06-22 09:30:48 +02:00
Adding default date for date_create and date_update columns
The dates are set in EmComponent::create() for date_create and in EmComponent::save() for date_update The values are sets to datetime.datetime.utcnow() so we now that EVERY date in the db are in UTC, no matter django, database or even server configurations. We will have to take care to convert dates from database to django timezone in dates fieldtypes.
This commit is contained in:
parent
c100dd43f3
commit
f26e87f621
1 changed files with 2 additions and 2 deletions
|
|
@ -5,8 +5,8 @@ import sqlalchemy as sql
|
|||
|
||||
class SQLSetup(object):
|
||||
|
||||
def initDb(self, dbconfname = 'default'):
|
||||
db = SqlWrapper(read_db = dbconfname, write_db = dbconfname, alchemy_logs=True)
|
||||
def initDb(self, dbconfname = 'default', alchemy_logs=None):
|
||||
db = SqlWrapper(read_db = dbconfname, write_db = dbconfname, alchemy_logs=alchemy_logs)
|
||||
tables = self.get_schema()
|
||||
db.dropAll()
|
||||
db.createAllFromConf(tables)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue