-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move to SPDX licenses Found a way to do this without breaking API compat, so here it is, instead of waiting for v3 Resolves MOD-129 Resolves #396 * License URL updates * what was I thinking * Do a thing * Add open source filter * Remove dead imports * Borrow * Update 20220910132835_spdx-licenses.sql * Add license text route * Update migration * Address comments
- Loading branch information
Showing
15 changed files
with
730 additions
and
989 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
ALTER TABLE mods ADD COLUMN license_new varchar(2048) DEFAULT 'LicenseRef-All-Rights-Reserved' NOT NULL; | ||
|
||
UPDATE mods SET license_new = licenses.short FROM licenses WHERE mods.license = licenses.id; | ||
|
||
UPDATE mods SET license_new = 'LicenseRef-Custom' WHERE license_new = 'custom'; | ||
UPDATE mods SET license_new = 'LicenseRef-All-Rights-Reserved' WHERE license_new = 'arr'; | ||
UPDATE mods SET license_new = 'Apache-2.0' WHERE license_new = 'apache'; | ||
UPDATE mods SET license_new = 'BSD-2-Clause' WHERE license_new = 'bsd-2-clause'; | ||
UPDATE mods SET license_new = 'BSD-3-Clause' WHERE license_new = 'bsd-3-clause' OR license_new = 'bsd'; | ||
UPDATE mods SET license_new = 'CC0-1.0' WHERE license_new = 'cc0'; | ||
UPDATE mods SET license_new = 'Unlicense' WHERE license_new = 'unlicense'; | ||
UPDATE mods SET license_new = 'MIT' WHERE license_new = 'mit'; | ||
UPDATE mods SET license_new = 'LGPL-3.0-only' WHERE license_new = 'lgpl-3'; | ||
UPDATE mods SET license_new = 'LGPL-2.1-only' WHERE license_new = 'lgpl-2.1' OR license_new = 'lgpl'; | ||
UPDATE mods SET license_new = 'MPL-2.0' WHERE license_new = 'mpl-2'; | ||
UPDATE mods SET license_new = 'ISC' WHERE license_new = 'isc'; | ||
UPDATE mods SET license_new = 'Zlib' WHERE license_new = 'zlib'; | ||
UPDATE mods SET license_new = 'GPL-2.0-only' WHERE license_new = 'gpl-2'; | ||
UPDATE mods SET license_new = 'GPL-3.0-only' WHERE license_new = 'gpl-3'; | ||
UPDATE mods SET license_new = 'AGPL-3.0-only' WHERE license_new = 'agpl'; | ||
|
||
UPDATE mods SET license_url = NULL WHERE license_url LIKE 'https://cdn.modrinth.com/licenses/%'; | ||
|
||
ALTER TABLE mods DROP COLUMN license; | ||
ALTER TABLE mods RENAME COLUMN license_new TO license; | ||
|
||
DROP TABLE licenses; |
Oops, something went wrong.