-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Python 3.12 sqlite deprecation warnings; migrate to more correct …
…DATETIME sqlite column type.
- Loading branch information
Showing
6 changed files
with
59 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/gened/migrations/20240726--change-timestamp-to-datetime.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
-- SPDX-FileCopyrightText: 2024 Mark Liffiton <[email protected]> | ||
-- | ||
-- SPDX-License-Identifier: AGPL-3.0-only | ||
|
||
PRAGMA foreign_keys = OFF; | ||
|
||
BEGIN; | ||
|
||
-- Somewhat dangerous hack to switch column types given no ALTER COLUMN ability in SQLite | ||
-- But the alternative is recreate, copy, and drop every table, keeping track of indexes, etc. | ||
PRAGMA writable_schema = 1; | ||
UPDATE SQLITE_MASTER SET SQL = REPLACE(SQL, ' TIMESTAMP ', ' DATETIME '); | ||
PRAGMA writable_schema = 0; | ||
|
||
COMMIT; | ||
|
||
PRAGMA foreign_keys = ON; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters