summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/docs/21
-rw-r--r--data/global.pl2
-rw-r--r--data/lang.txt12
-rw-r--r--util/updates/update_2.25.sql12
4 files changed, 13 insertions, 14 deletions
diff --git a/data/docs/2 b/data/docs/2
index 9b092c5f..1a88d5fe 100644
--- a/data/docs/2
+++ b/data/docs/2
@@ -93,7 +93,6 @@ href="/d16">add it</a> first.
</p>
<dl>
<dt>Scenario</dt><dd>&nbsp;</dd>
- <dt>Script</dt><dd>&nbsp;</dd>
<dt>Character design</dt><dd>&nbsp;</dd>
<dt>Composer</dt><dd>&nbsp;</dd>
<dt>Director</dt><dd>&nbsp;</dd>
diff --git a/data/global.pl b/data/global.pl
index 6c02d0c0..52792aed 100644
--- a/data/global.pl
+++ b/data/global.pl
@@ -114,7 +114,7 @@ our %S = (%S,
changes => [ 25, 'VNDB Recent Changes', '/hist' ],
posts => [ 25, 'VNDB Recent Posts', '/t' ],
},
- staff_roles => [qw|scenario script chardesign music director art songs staff|],
+ staff_roles => [qw|scenario chardesign music director art songs staff|],
);
diff --git a/data/lang.txt b/data/lang.txt
index 63a22da2..3cd556c0 100644
--- a/data/lang.txt
+++ b/data/lang.txt
@@ -5395,18 +5395,6 @@ tr*:
uk*:
it*:
-:_credit_script
-en : Script
-ru*:
-cs*:
-hu*:
-nl*:
-de*:
-es*:
-tr*:
-uk*:
-it*:
-
:_credit_chardesign
en : Character design
ru*:
diff --git a/util/updates/update_2.25.sql b/util/updates/update_2.25.sql
index 5188cca2..f9168cf7 100644
--- a/util/updates/update_2.25.sql
+++ b/util/updates/update_2.25.sql
@@ -1,2 +1,14 @@
ALTER TYPE credit_type ADD VALUE 'scenario' BEFORE 'script';
+
+BEGIN;
+-- There are no entries in the database where a single aid has both a script
+-- and a staff role, and where a note has been associated with the script role.
+-- So this conversion does not attempt to merge notes when merging roles.
+UPDATE vn_staff vs SET role = 'staff', note = CASE WHEN note = '' THEN 'Scripting' ELSE note END
+ WHERE role = 'script' AND NOT EXISTS(SELECT 1 FROM vn_staff v2 where v2.vid = vs.vid AND v2.aid = vs.aid AND role = 'staff');
+UPDATE vn_staff vs SET note = CASE WHEN note = '' THEN 'Scripting' ELSE note || ', Scripting' END
+ WHERE role = 'staff' AND EXISTS(SELECT 1 FROM vn_staff v2 where v2.vid = vs.vid AND v2.aid = vs.aid AND role = 'script');
+DELETE FROM vn_staff WHERE role = 'script';
+COMMIT;
+