Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F1300016
20151024162823_create_hosts_table.rb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Nov 19, 6:31 AM
Size
533 B
Mime Type
text/x-ruby
Expires
Fri, Nov 21, 6:31 AM (1 d, 9 h)
Engine
blob
Format
Raw Data
Handle
294770
Attached To
rARCHIVING archiving
20151024162823_create_hosts_table.rb
View Options
class
CreateHostsTable
<
ActiveRecord
::
Migration
def
connection
ActiveRecord
::
Base
.
establish_connection
(
Baas
::
settings
[
:local_db
]
)
.
connection
end
def
change
create_table
:hosts
do
|
t
|
t
.
binary
:name
,
limit
:
255
,
null
:
false
t
.
binary
:fqdn
,
limit
:
255
,
null
:
false
t
.
integer
:port
,
null
:
false
t
.
integer
:file_retention
,
null
:
false
t
.
integer
:job_retention
,
null
:
false
t
.
timestamps
end
add_index
:hosts
,
:name
,
unique
:
true
,
length
:
{
name
:
128
},
using
:
:btree
end
end
Event Timeline
Log In to Comment