Skip to content

Commit

Permalink
extend migration script for 1.4.0 to fix #13
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Hofer committed Oct 13, 2023
1 parent 0facc82 commit fb2ae96
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions migration_1.4.0.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@

ALTER TABLE `ddns_token`
ADD COLUMN `server_id` int(11) unsigned NOT NULL DEFAULT 0 AFTER id;

select @server_id := server_id from server
where active=1 and dns_server=1
order by server_id
limit 1;

update ddns_token set server_id = @server_id
where server_id = 0;

update sys_datalog set server_id = @server_id
where server_id = 0 and dbtable = 'ddns_token';

0 comments on commit fb2ae96

Please sign in to comment.