File: alternate_id.sql

package info (click to toggle)
opendb 0.81p18-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,716 kB
  • ctags: 6,787
  • sloc: php: 50,213; sql: 3,098; sh: 272; makefile: 54; xml: 48
file content (17 lines) | stat: -rw-r--r-- 1,304 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#
# Configure an alternate ID for items.
#
# You can display this ID in title listings by modifying the include/config $listings['title_display_mask']
# 'DEFAULT'=>'{title}{ifdef(alt_id, " ({alt_id})")}',

# Cleanup first so this can be rerun.
DELETE from s_attribute_type WHERE s_attribute_type = 'ALT_ID';
DELETE from s_item_attribute_type WHERE s_attribute_type = 'ALT_ID';

INSERT INTO s_attribute_type (s_attribute_type, description, prompt, input_type, display_type, s_field_type, site_type) VALUES ( 'ALT_ID', 'Alternate Item ID', 'Item ID', 'text(10)', 'display(%value%)', NULL, NULL);

INSERT INTO s_item_attribute_type (s_item_type, s_attribute_type, order_no, prompt, compulsory_ind) VALUES ( 'CD', 'ALT_ID', '1', '', NULL);
INSERT INTO s_item_attribute_type (s_item_type, s_attribute_type, order_no, prompt, compulsory_ind) VALUES ( 'LD', 'ALT_ID', '1', '', NULL);
INSERT INTO s_item_attribute_type (s_item_type, s_attribute_type, order_no, prompt, compulsory_ind) VALUES ( 'VCD', 'ALT_ID', '1', '', NULL);
INSERT INTO s_item_attribute_type (s_item_type, s_attribute_type, order_no, prompt, compulsory_ind) VALUES ( 'DVD', 'ALT_ID', '1', '', NULL);
INSERT INTO s_item_attribute_type (s_item_type, s_attribute_type, order_no, prompt, compulsory_ind) VALUES ( 'DIVX', 'ALT_ID', '1', '', NULL);