161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
|
# File 'lib/casserver/models.rb', line 161
def self.up
if ActiveRecord::Base.connection.table_alias_length > 30
$LOG.info("Shortening table names")
rename_table :casserver_login_tickets, :casserver_lt
rename_table :casserver_service_tickets, :casserver_st
rename_table :casserver_ticket_granting_tickets, :casserver_tgt
rename_table :casserver_proxy_granting_tickets, :casserver_pgt
else
create_table :casserver_lt, :force => true do |t|
t.column :ticket, :string, :null => false
t.column :created_on, :timestamp, :null => false
t.column :consumed, :datetime, :null => true
t.column :client_hostname, :string, :null => false
end
create_table :casserver_st, :force => true do |t|
t.column :ticket, :string, :null => false
t.column :service, :string, :null => false
t.column :created_on, :timestamp, :null => false
t.column :consumed, :datetime, :null => true
t.column :client_hostname, :string, :null => false
t.column :username, :string, :null => false
t.column :type, :string, :null => false
t.column :proxy_granting_ticket_id, :integer, :null => true
end
create_table :casserver_tgt, :force => true do |t|
t.column :ticket, :string, :null => false
t.column :created_on, :timestamp, :null => false
t.column :client_hostname, :string, :null => false
t.column :username, :string, :null => false
end
create_table :casserver_pgt, :force => true do |t|
t.column :ticket, :string, :null => false
t.column :created_on, :timestamp, :null => false
t.column :client_hostname, :string, :null => false
t.column :iou, :string, :null => false
t.column :service_ticket_id, :integer, :null => false
end
end
end
|