-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extend migration script for 1.4.0 to fix #13
- Loading branch information
Marcel Hofer
committed
Oct 13, 2023
1 parent
0facc82
commit fb2ae96
Showing
1 changed file
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |