aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJochen Topf <jochen@topf.org>2013-01-18 11:30:40 +0100
committerJochen Topf <jochen@topf.org>2013-01-18 11:30:40 +0100
commit1c332107b2fc68f997cee654cfcf18604ab55c9b (patch)
tree3a9583dcf030ad35d93e51fc5a512c7898bc330f
parent04f646e372367e695ea258fbc4ef2fd62f1ca31b (diff)
downloadtaginfo-1c332107b2fc68f997cee654cfcf18604ab55c9b.tar
taginfo-1c332107b2fc68f997cee654cfcf18604ab55c9b.tar.gz
Set data_until for languages source to import time
-rwxr-xr-xsources/languages/import_subtag_registry.rb4
-rw-r--r--sources/languages/pre.sql2
2 files changed, 1 insertions, 5 deletions
diff --git a/sources/languages/import_subtag_registry.rb b/sources/languages/import_subtag_registry.rb
index 636181e..ac3d17b 100755
--- a/sources/languages/import_subtag_registry.rb
+++ b/sources/languages/import_subtag_registry.rb
@@ -103,10 +103,6 @@ SUBTAG_TYPES = %w( language script region variant )
db.execute('BEGIN TRANSACTION');
-if file_date
- db.execute("UPDATE source SET data_until=?", "#{file_date} 00:00:00")
-end
-
Subtag.entries.each do |entry|
if SUBTAG_TYPES.include?(entry.type) &&
entry.description != 'Private use' &&
diff --git a/sources/languages/pre.sql b/sources/languages/pre.sql
index 2cf0aa7..7f7f021 100644
--- a/sources/languages/pre.sql
+++ b/sources/languages/pre.sql
@@ -6,7 +6,7 @@
.bail ON
-INSERT INTO source (id, name, update_start) SELECT 'languages', 'Languages', datetime('now');
+INSERT INTO source (id, name, update_start, data_until) SELECT 'languages', 'Languages', datetime('now'), datetime('now');
DROP TABLE IF EXISTS subtags;