peterm
committed
on 19 Dec 03
Adding the __new, __name, and __name functions for the sim_case object type. giving drop scripts same structure as create scripts.
/postgresql/simulation-content-types-drop.sql (+165)
  1 -- @author Lars Pind (lars@collaboraid.biz)
  2 -- @creation-date 2003-10-14
  3 -- @cvs-id $Id$
  4
  5 ----------------------------------------------------------------------
  6 -- drop everything in reverse order of creation
  7 ----------------------------------------------------------------------
  8 -- have to manually drop attributes because content_type__drop_type doesn't
  9 -- bad, stupid content_type__drop_type
  10
  11 ----------------------------------------------------------------------
  12 -- sim_case
  13 ----------------------------------------------------------------------
  14
  15 select content_type__drop_type(
  16     'sim_case',
  17     't',
  18     't'
  19 );
  20
  21 ----------------------------------------------------------------------
  22 -- sim_location
  23 ----------------------------------------------------------------------
  24
  25 select content_type__unregister_relation_type (
  26     'sim_location',                -- content_type
  27     'sim_location',                -- target_type
  28     'is_located_in'                -- relation_tag
  29 );
  30
  31 select content_type__unregister_relation_type (
  32     'sim_location',                -- content_type
  33     'image',                       -- target_type
  34     'thumbnail'                    -- relation_tag
  35 );
  36
  37 select content_type__unregister_relation_type (
  38     'sim_location',                -- content_type
  39     'sim_stylesheet',              -- target_type
  40     'stylesheet'                   -- relation_tag
  41 );
  42
  43 select content_type__unregister_relation_type (
  44     'sim_location',                -- content_type
  45     'image',                       -- target_type
  46     'image'                        -- relation_tag
  47 );
  48
  49 select content_type__unregister_relation_type (
  50     'sim_location',                -- content_type
  51     'image',                       -- target_type
  52     'letterhead'                   -- relation_tag
  53 );
  54
  55 select content_type__unregister_relation_type (
  56     'sim_location',                -- content_type
  57     'image',                       -- target_type
  58     'logo'                         -- relation_tag
  59 );
  60
  61 select content_type__drop_type(
  62     'sim_location',
  63     't',
  64     't'
  65 );
  66
  67
  68 ----------------------------------------------------------------------
  69 -- sim_message
  70 ----------------------------------------------------------------------
  71
  72 select content_type__unregister_relation_type (
  73     'sim_message',                 -- content_type
  74     'sim_prop',                    -- target_type
  75     'attachment'                   -- relation_tag
  76 );
  77
  78 select content_type__drop_type(
  79     'sim_message',
  80     't',
  81     't'
  82 );
  83
  84
  85
  86 ----------------------------------------------------------------------
  87 -- sim_prop
  88 ----------------------------------------------------------------------
  89
  90 select content_type__unregister_relation_type (
  91     'sim_prop',                    -- content_type
  92     'image',                       -- target_type
  93     'thumbnail'                    -- relation_tag
  94 );
  95
  96 select content_type__unregister_relation_type (
  97     'sim_prop',                    -- content_type
  98     'sim_stylesheet',              -- target_type
  99     'stylesheet'                   -- relation_tag
  100 );
  101
  102 select content_type__unregister_relation_type (
  103     'sim_prop',                    -- content_type
  104     'image',                       -- target_type
  105     'image'                        -- relation_tag
  106 );
  107
  108 select content_type__drop_type(
  109     'sim_prop',
  110     't',
  111     't'
  112 );
  113
  114
  115 ----------------------------------------------------------------------
  116 -- sim_character
  117 ----------------------------------------------------------------------
  118
  119 select content_type__unregister_relation_type (
  120     'sim_character',               -- content_type
  121     'sim_location',                -- target_type
  122     'resides_at'                   -- relation_tag
  123 );
  124
  125
  126 select content_type__unregister_relation_type (
  127     'sim_character',               -- content_type
  128     'sim_location',                -- target_type
  129     'works_for'                    -- relation_tag
  130 );
  131
  132 select content_type__unregister_relation_type (
  133     'sim_character',               -- content_type
  134     'image',                       -- target_type
  135     'thumbnail'                    -- relation_tag
  136 );
  137
  138 select content_type__unregister_relation_type (
  139     'sim_character',               -- content_type
  140     'sim_stylesheet',              -- target_type
  141     'stylesheet'                   -- relation_tag
  142 );
  143
  144 select content_type__unregister_relation_type (
  145     'sim_character',               -- content_type
  146     'image',                       -- target_type
  147     'image'                        -- relation_tag
  148 );
  149
  150 select content_type__drop_type(
  151     'sim_character',
  152     't',
  153     't'
  154 );
  155
  156 ----------------------------------------------------------------------
  157 -- sim_stylesheet
  158 ----------------------------------------------------------------------
  159
  160 select content_type__drop_type(
  161     'sim_stylesheet',
  162     't',
  163     't'
  164
  165 );