Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorRaphael Sofaer <raphael@joindiaspora.com>2011-05-27 04:46:21 +0400
committerMaxwell Salzberg <maxwell@joindiaspora.com>2011-06-04 03:22:38 +0400
commit381b85189db652f69965676e6d02e636d2cf3a5f (patch)
tree3bfc04286055e98a0a1f6bd962c7d0774df3a20b /db
parent8841f62cf05a7a93f9c99335e3a54c454495e7da (diff)
Add Chubbies, the oauth sample app, and a cucumber feature for part of an oauth flow
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20110526184644_add_oauth2_tables.rb42
-rw-r--r--db/schema.rb32
2 files changed, 74 insertions, 0 deletions
diff --git a/db/migrate/20110526184644_add_oauth2_tables.rb b/db/migrate/20110526184644_add_oauth2_tables.rb
new file mode 100644
index 000000000..7d20f7418
--- /dev/null
+++ b/db/migrate/20110526184644_add_oauth2_tables.rb
@@ -0,0 +1,42 @@
+class AddOauth2Tables < ActiveRecord::Migration
+ def self.up
+ create_table 'oauth_clients', :force => true do |t|
+ t.string 'name'
+ t.string 'oauth_identifier', :limit => 32, :null => false
+ t.string 'oauth_secret', :limit => 32, :null => false
+ end
+
+ create_table 'oauth_authorization_codes', :force => true do |t|
+ t.integer 'authorization_id', :null => false
+ t.string 'code', :limit => 32, :null => false
+ t.datetime 'expires_at'
+ t.datetime 'created_at'
+ t.datetime 'updated_at'
+ t.string 'redirect_uri'
+ end
+
+ create_table 'oauth_authorizations', :force => true do |t|
+ t.integer 'client_id', :null => false
+ t.integer 'resource_owner_id'
+ t.string 'resource_owner_type', :limit => 32
+ t.string 'scope'
+ t.datetime 'expires_at'
+ end
+
+ create_table 'oauth_access_tokens', :force => true do |t|
+ t.integer 'authorization_id', :null => false
+ t.string 'access_token', :limit => 32, :null => false
+ t.string 'refresh_token', :limit => 32
+ t.datetime 'expires_at'
+ t.datetime 'created_at'
+ t.datetime 'updated_at'
+ end
+ end
+
+ def self.down
+ drop_table 'oauth_access_tokens'
+ drop_table 'oauth_authorizations'
+ drop_table 'oauth_authorization_codes'
+ drop_table 'oauth_clients'
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 044cccfca..78a15252d 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -195,6 +195,38 @@ ActiveRecord::Schema.define(:version => 20110603212633) do
add_index "notifications", ["target_id"], :name => "index_notifications_on_target_id"
add_index "notifications", ["target_type", "target_id"], :name => "index_notifications_on_target_type_and_target_id"
+ create_table "oauth_access_tokens", :force => true do |t|
+ t.integer "authorization_id", :null => false
+ t.string "access_token", :limit => 32, :null => false
+ t.string "refresh_token", :limit => 32
+ t.datetime "expires_at"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ create_table "oauth_authorization_codes", :force => true do |t|
+ t.integer "authorization_id", :null => false
+ t.string "code", :limit => 32, :null => false
+ t.datetime "expires_at"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.string "redirect_uri"
+ end
+
+ create_table "oauth_authorizations", :force => true do |t|
+ t.integer "client_id", :null => false
+ t.integer "resource_owner_id"
+ t.string "resource_owner_type", :limit => 32
+ t.string "scope"
+ t.datetime "expires_at"
+ end
+
+ create_table "oauth_clients", :force => true do |t|
+ t.string "name"
+ t.string "oauth_identifier", :limit => 32, :null => false
+ t.string "oauth_secret", :limit => 32, :null => false
+ end
+
create_table "people", :force => true do |t|
t.string "guid", :null => false
t.text "url", :null => false