Skip to content

Commit

Permalink
Better sequence links
Browse files Browse the repository at this point in the history
  • Loading branch information
asm0dey committed Aug 21, 2023
1 parent 1c593ec commit 66f31e9
Show file tree
Hide file tree
Showing 15 changed files with 263 additions and 126 deletions.
15 changes: 15 additions & 0 deletions HEADER.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
${projectName}
Copyright (C) ${year} ${owner}

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ plugins {
}

group = "io.github.asm0dey"
version = "0.1.2"
version = "0.1.3"
application {
mainClass.set("io.github.asm0dey.ApplicationKt")

Expand Down
8 changes: 8 additions & 0 deletions src/flyway/resources/db/migration/V6__sequence_ids.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ALTER TABLE book
ADD COLUMN seqid INT;

UPDATE book
SET seqid=numbers.seqrow
FROM (SELECT ROW_NUMBER() OVER () seqrow, seqname
FROM (SELECT DISTINCT(sequence) seqname FROM book WHERE book.sequence IS NOT NULL ORDER BY sequence)) AS numbers
WHERE book.sequence = numbers.seqname;
19 changes: 12 additions & 7 deletions src/main/java/io/github/asm0dey/opdsko/jooq/tables/Book.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 66f31e9

Please sign in to comment.