8000 Implement column defaults for INSERT/UPDATE by GarbageHamburger · Pull Request #206 · encode/databases · GitHub
[go: up one dir, main page]

Skip to content

Implement column defaults for INSERT/UPDATE #206

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix column defaults test for MySQL
MySQL rounds datetimes to seconds.
  • Loading branch information
GarbageHamburger committed May 4, 2020
commit f66013e4e4c3a04fe3ae068e02dbb78d010f8156
3 changes: 2 additions & 1 deletion tests/test_databases.py
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,8 @@ async def test_column_defaults(database_url):
await database.execute(timestamps.delete())

# with default value overridden
dt = datetime.datetime.now() - datetime.timedelta(seconds=10)
dt = datetime.datetime.now()
dt -= datetime.timedelta(seconds=10, microseconds=dt.microsecond)
values = {"timestamp": dt}
await database.execute(query, values)
results = await database.fetch_all(timestamps.select())
Expand Down
0