10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
# File 'lib/rtm/activerecord/001_initial_schema.rb', line 10
def self.up
create_table :topic_maps do |t|
t.column :base_locator, :string, :null => false
end
create_table :topics do |t|
t.column :topic_map_id, :integer, :null => false
t.column :reified_id, :integer
t.column :reified_type, :string
end
create_table :associations do |t|
t.column :topic_map_id, :integer, :null => false
t.column :ttype_id, :integer
end
create_table :roles do |t|
t.column :association_id, :integer, :null => false
t.column :ttype_id, :integer
t.column :topic_id, :integer
end
create_table :names do |t|
t.column :topic_id, :integer, :null => false
t.column :ttype_id, :integer
t.column :value, :string
end
create_table :occurrences do |t|
t.column :topic_id, :integer, :null => false
t.column :ttype_id, :integer
t.column :value, :text
t.column :datatype, :string
end
create_table :variants do |t|
t.column :name_id, :integer, :null => false
t.column :value, :text
t.column :datatype, :string
end
create_table :item_identifiers do |t|
t.column :topic_map_id, :integer, :null => false
t.column :reference, :string, :null => false
t.column :construct_id, :integer
t.column :construct_type, :string
end
create_table :subject_identifiers do |t|
t.column :topic_map_id, :integer, :null => false
t.column :reference, :string, :null => false
t.column :topic_id, :integer
end
create_table :subject_locators do |t|
t.column :topic_map_id, :integer, :null => false
t.column :reference, :string, :null => false
t.column :topic_id, :integer
end
create_table :scoped_objects_topics do |t|
t.column :scoped_object_id, :integer
t.column :scoped_object_type, :string
t.column :topic_id, :integer
end
end
|