jlelse
/
kis3
Archived
1
Fork 0

Update sqlite3 dependency and remove unneded down migrations

This commit is contained in:
Jan-Lukas Else 2019-04-30 10:53:38 +02:00
parent d3a1c467f9
commit c19cdf24b8
4 changed files with 3 additions and 15 deletions

2
go.mod
View File

@ -9,7 +9,7 @@ require (
github.com/gorilla/handlers v1.4.0
github.com/gorilla/mux v1.7.1
github.com/lib/pq v1.1.0 // indirect
github.com/mattn/go-sqlite3 v1.10.0
github.com/mattn/go-sqlite3 v0.0.0-20190424093727-5994cc52dfa8
github.com/mssola/user_agent v0.5.0
github.com/rubenv/sql-migrate v0.0.0-20190327083759-54bad0a9b051
github.com/ziutek/mymysql v1.5.4 // indirect

3
go.sum
View File

@ -37,7 +37,8 @@ github.com/lib/pq v1.1.0 h1:/5u4a+KGJptBRqGzPvYQL9p0d/tPR4S31+Tnzj9lEO4=
github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE=
github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0=
github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
github.com/mattn/go-sqlite3 v0.0.0-20190424093727-5994cc52dfa8 h1:ifqWo3p9CO7W4BYU07I43lm6OV+POAiiu3gwW3YwhEc=
github.com/mattn/go-sqlite3 v0.0.0-20190424093727-5994cc52dfa8/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
github.com/mssola/user_agent v0.5.0/go.mod h1:UFiKPVaShrJGW93n4uo8dpPdg1BSVpw2P9bneo0Mtp8=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=

View File

@ -5,6 +5,3 @@ CREATE TABLE IF NOT EXISTS `views`
`time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
`ref` TEXT DEFAULT '' NOT NULL
);
-- +migrate Down
DROP TABLE `views`;

View File

@ -1,13 +1,3 @@
-- +migrate Up
ALTER TABLE views
ADD COLUMN useragent TEXT DEFAULT '' NOT NULL;
-- +migrate Down
BEGIN TRANSACTION;
CREATE TABLE views_new AS
SELECT url, time, ref
FROM views;
DROP TABLE views;
ALTER TABLE views_new
RENAME TO views;
COMMIT;