Convert IP field from text to inet type

This commit is contained in:
Frédéric Guillot 2018-05-21 12:36:21 -07:00
parent fb49ad24d5
commit cf7a7e25fb
3 changed files with 5 additions and 2 deletions

View File

@ -0,0 +1 @@
alter table user_sessions alter column ip set data type inet using ip::inet;

View File

@ -1,5 +1,5 @@
// Code generated by go generate; DO NOT EDIT.
// 2018-05-20 15:22:33.771570698 -0700 PDT m=+0.003041211
// 2018-05-21 12:33:12.475674107 -0700 PDT m=+0.003076147
package sql
@ -135,6 +135,7 @@ alter table integrations add column nunux_keeper_api_key text default '';`,
alter table integrations add column pocket_access_token text default '';
alter table integrations add column pocket_consumer_key text default '';
`,
"schema_version_18": `alter table user_sessions alter column ip set data type inet using ip::inet;`,
"schema_version_2": `create extension if not exists hstore;
alter table users add column extra hstore;
create index users_extra_idx on users using gin(extra);
@ -183,6 +184,7 @@ var SqlMapChecksums = map[string]string{
"schema_version_15": "13ff91462bdf4cda5a94a4c7a09f757761b0f2c32b4be713ba4786a4837750e4",
"schema_version_16": "9d006faca62fd7ab787f64aef0e0a5933d142466ec4cab0e096bb920d2797e34",
"schema_version_17": "b9f15d6217275fedcf6d948dd85ebe978b869bf37f42a86fd5b50a51919fa0e1",
"schema_version_18": "c0ec24847612c7f2dc326cf735baffba79391a56aedd73292371a39f38724a71",
"schema_version_2": "e8e9ff32478df04fcddad10a34cba2e8bb1e67e7977b5bd6cdc4c31ec94282b4",
"schema_version_3": "a54745dbc1c51c000f74d4e5068f1e2f43e83309f023415b1749a47d5c1e0f12",
"schema_version_4": "216ea3a7d3e1704e40c797b5dc47456517c27dbb6ca98bf88812f4f63d74b5d9",

View File

@ -12,7 +12,7 @@ import (
"github.com/miniflux/miniflux/sql"
)
const schemaVersion = 17
const schemaVersion = 18
// Migrate run database migrations.
func (s *Storage) Migrate() {