node: Migrate IPv6 addresses in database
The format for IPv6 addresses was changed in
df8e4e6c88 to require '[' and ']'.
IPv6 addresses that were stored in the database in the past must be
migrated.
This commit is contained in:
parent
9e8f09a144
commit
0736977170
|
|
@ -37,6 +37,7 @@ const MIGRATIONS: &[&str] = &[
|
|||
include_str!("db/migrations/4.sql"),
|
||||
include_str!("db/migrations/5.sql"),
|
||||
include_str!("db/migrations/6.sql"),
|
||||
include_str!("db/migrations/7.sql"),
|
||||
];
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
update addresses set value = concat('[', rtrim(ltrim(rtrim(value, replace(value, ':', '')), '['), ']:'), ']:', replace(value, rtrim(value, replace(value, ':', '')), '')) where type = "ipv6";
|
||||
Loading…
Reference in New Issue