4
5
6
7
8
9
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
|
# File 'lib/pasaporte/models.rb', line 4
def self.up
create_table :pasaporte_profiles, :force => true do |t|
t.column :nickname, :string, MAX => 20
t.column :email, :string, MAX => 70
t.column :fullname, :string, MAX => 50
t.column :dob, :date, :null => true
t.column :gender, :string, MAX => 1
t.column :postcode, :string, MAX => 10
t.column :country, :string, MAX => 2
t.column :language, :string, MAX => 5
t.column :timezone, :string, MAX => 50
t.column :shared, :boolean, :default => false
t.column :info, :text
t.column :last_login, :datetime
t.column :secret_salt, :integer
t.column :openid_server, :string
t.column :openid_delegate, :string
t.column :domain_name, :string, :null => false, :default => 'localhost'
t.column :throttle_count, :integer, :default => 0
t.column :suspicious, :boolean, :default => false
end
add_index(:pasaporte_profiles, [:nickname, :domain_name], :unique)
create_table :pasaporte_settings do |t|
t.column :setting, :string
t.column :value, :binary
end
create_table :pasaporte_associations do |t|
t.column :server_url, :binary
t.column :handle, :string
t.column :secret, :binary
t.column :issued, :integer
t.column :lifetime, :integer
t.column :assoc_type, :string
end
create_table :pasaporte_nonces do |t|
t.column :nonce, :string
t.column :created, :integer
end
create_table :pasaporte_throttles do |t|
t.column :created_at, :datetime
t.column :client_fingerprint, :string, MAX => 40
end
end
|