[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible: move (nearly) all timestamps from strings to real timestamps data types
Mattia Rizzolo
gitlab at salsa.debian.org
Mon Dec 2 17:36:02 GMT 2019
Mattia Rizzolo pushed to branch master at Debian QA / jenkins.debian.net
Commits:
6e7a475c by Mattia Rizzolo at 2019-12-02T17:34:00Z
reproducible: move (nearly) all timestamps from strings to real timestamps data types
Signed-off-by: Mattia Rizzolo <mattia at debian.org>
- - - - -
1 changed file:
- bin/reproducible_db_maintenance.py
Changes:
=====================================
bin/reproducible_db_maintenance.py
=====================================
@@ -726,6 +726,19 @@ schema_updates = {
"UPDATE schedule SET build_type='ci_build'",
"ALTER TABLE schedule ALTER COLUMN build_type SET NOT NULL",
],
+ 47: [ # turn timestamps into real timestamps
+ "ALTER TABLE {0} ALTER COLUMN {1} TYPE timestamp without time zone "
+ "USING to_timestamp({1}, 'YYYY-MM-DD HH24:MI:SS')".format(i, j) for i, j in (
+ ("results", "build_date"),
+ ("schedule", "date_scheduled"),
+ )] + [
+ "ALTER TABLE {0} ALTER COLUMN datum TYPE date "
+ "USING to_date(datum, 'YYYY-MM-DD')".format(i) for i in (
+ "stats_breakages", "stats_bugs", "stats_builds_age",
+ "stats_builds_per_day", "stats_issues", "stats_meta_pkg_state",
+ "stats_notes", "stats_pkg_state",
+ )
+ ],
}
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/6e7a475ca02e57cfd99d9e55725974020c12da98
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/6e7a475ca02e57cfd99d9e55725974020c12da98
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20191202/1aa383cf/attachment.html>
More information about the Qa-jenkins-scm
mailing list