From 78809798adfa657332a2e88a25c38db84aef8f7e Mon Sep 17 00:00:00 2001
From: Maxwell Salzberg <maxwell@joindiaspora.com>
Date: Tue, 22 May 2012 11:24:36 -0700
Subject: [PATCH] update schema, also made bob and admin in the seeds [ci skip]

---
 db/schema.rb | 100 +++++++++++++++++++++++++--------------------------
 db/seeds.rb  |   5 ++-
 2 files changed, 54 insertions(+), 51 deletions(-)

diff --git a/db/schema.rb b/db/schema.rb
index 166c1d4306..7cb2c7b836 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -21,8 +21,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
   create_table "aspect_memberships", :force => true do |t|
     t.integer  "aspect_id",  :null => false
     t.integer  "contact_id", :null => false
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at", :null => false
+    t.datetime "updated_at", :null => false
   end
 
   add_index "aspect_memberships", ["aspect_id", "contact_id"], :name => "index_aspect_memberships_on_aspect_id_and_contact_id", :unique => true
@@ -32,8 +32,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
   create_table "aspect_visibilities", :force => true do |t|
     t.integer  "shareable_id",                       :null => false
     t.integer  "aspect_id",                          :null => false
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at",                         :null => false
+    t.datetime "updated_at",                         :null => false
     t.string   "shareable_type", :default => "Post", :null => false
   end
 
@@ -44,8 +44,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
   create_table "aspects", :force => true do |t|
     t.string   "name",                               :null => false
     t.integer  "user_id",                            :null => false
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at",                         :null => false
+    t.datetime "updated_at",                         :null => false
     t.boolean  "contacts_visible", :default => true, :null => false
     t.integer  "order_id"
   end
@@ -65,8 +65,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
     t.string   "guid",                                                      :null => false
     t.text     "author_signature"
     t.text     "parent_author_signature"
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at",                                                :null => false
+    t.datetime "updated_at",                                                :null => false
     t.integer  "likes_count",                           :default => 0,      :null => false
     t.string   "commentable_type",        :limit => 60, :default => "Post", :null => false
   end
@@ -78,8 +78,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
   create_table "contacts", :force => true do |t|
     t.integer  "user_id",                       :null => false
     t.integer  "person_id",                     :null => false
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at",                    :null => false
+    t.datetime "updated_at",                    :null => false
     t.boolean  "sharing",    :default => false, :null => false
     t.boolean  "receiving",  :default => false, :null => false
   end
@@ -91,8 +91,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
     t.integer  "conversation_id",                :null => false
     t.integer  "person_id",                      :null => false
     t.integer  "unread",          :default => 0, :null => false
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at",                     :null => false
+    t.datetime "updated_at",                     :null => false
   end
 
   add_index "conversation_visibilities", ["conversation_id", "person_id"], :name => "index_conversation_visibilities_usefully", :unique => true
@@ -103,8 +103,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
     t.string   "subject"
     t.string   "guid",       :null => false
     t.integer  "author_id",  :null => false
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at", :null => false
+    t.datetime "updated_at", :null => false
   end
 
   add_index "conversations", ["author_id"], :name => "conversations_author_id_fk"
@@ -113,8 +113,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
     t.string   "token"
     t.integer  "user_id"
     t.integer  "count"
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at", :null => false
+    t.datetime "updated_at", :null => false
   end
 
   create_table "invitations", :force => true do |t|
@@ -122,8 +122,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
     t.integer  "sender_id"
     t.integer  "recipient_id"
     t.integer  "aspect_id"
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at",                      :null => false
+    t.datetime "updated_at",                      :null => false
     t.string   "service"
     t.string   "identifier"
     t.boolean  "admin",        :default => false
@@ -141,8 +141,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
     t.string   "guid"
     t.text     "author_signature"
     t.text     "parent_author_signature"
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at",                                              :null => false
+    t.datetime "updated_at",                                              :null => false
     t.string   "target_type",             :limit => 60,                   :null => false
   end
 
@@ -165,8 +165,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
     t.integer  "author_id",               :null => false
     t.string   "guid",                    :null => false
     t.text     "text",                    :null => false
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at",              :null => false
+    t.datetime "updated_at",              :null => false
     t.text     "author_signature"
     t.text     "parent_author_signature"
   end
@@ -177,8 +177,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
   create_table "notification_actors", :force => true do |t|
     t.integer  "notification_id"
     t.integer  "person_id"
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at",      :null => false
+    t.datetime "updated_at",      :null => false
   end
 
   add_index "notification_actors", ["notification_id", "person_id"], :name => "index_notification_actors_on_notification_id_and_person_id", :unique => true
@@ -190,8 +190,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
     t.integer  "target_id"
     t.integer  "recipient_id",                   :null => false
     t.boolean  "unread",       :default => true, :null => false
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at",                     :null => false
+    t.datetime "updated_at",                     :null => false
     t.string   "type"
   end
 
@@ -213,8 +213,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
     t.integer  "author_id"
     t.text     "author_signature"
     t.text     "parent_author_signature"
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at",                            :null => false
+    t.datetime "updated_at",                            :null => false
   end
 
   add_index "participations", ["guid"], :name => "index_participations_on_guid"
@@ -226,8 +226,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
     t.string   "diaspora_handle",                          :null => false
     t.text     "serialized_public_key",                    :null => false
     t.integer  "owner_id"
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at",                               :null => false
+    t.datetime "updated_at",                               :null => false
     t.boolean  "closed_account",        :default => false
   end
 
@@ -261,8 +261,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
   create_table "pods", :force => true do |t|
     t.string   "host"
     t.boolean  "ssl"
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at", :null => false
+    t.datetime "updated_at", :null => false
   end
 
   create_table "posts", :force => true do |t|
@@ -277,8 +277,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
     t.string   "remote_photo_name"
     t.string   "random_string"
     t.string   "processed_image"
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at",                                             :null => false
+    t.datetime "updated_at",                                             :null => false
     t.string   "unprocessed_image"
     t.string   "object_url"
     t.string   "image_url"
@@ -319,8 +319,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
     t.text     "bio"
     t.boolean  "searchable",                      :default => true,  :null => false
     t.integer  "person_id",                                          :null => false
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at",                                         :null => false
+    t.datetime "updated_at",                                         :null => false
     t.string   "location"
     t.string   "full_name",        :limit => 70
     t.boolean  "nsfw",                            :default => false
@@ -338,8 +338,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
     t.string   "table"
     t.integer  "month",      :limit => 2
     t.integer  "year",       :limit => 8
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at",              :null => false
+    t.datetime "updated_at",              :null => false
   end
 
   add_index "rails_admin_histories", ["item", "table", "month", "year"], :name => "index_rails_admin_histories"
@@ -347,8 +347,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
   create_table "roles", :force => true do |t|
     t.integer  "person_id"
     t.string   "name"
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at", :null => false
+    t.datetime "updated_at", :null => false
   end
 
   create_table "services", :force => true do |t|
@@ -358,8 +358,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
     t.string   "access_token"
     t.string   "access_secret"
     t.string   "nickname"
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at",                   :null => false
+    t.datetime "updated_at",                   :null => false
   end
 
   add_index "services", ["type", "uid"], :name => "index_services_on_type_and_uid"
@@ -367,8 +367,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
 
   create_table "share_visibilities", :force => true do |t|
     t.integer  "shareable_id",                                     :null => false
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at",                                       :null => false
+    t.datetime "updated_at",                                       :null => false
     t.boolean  "hidden",                       :default => false,  :null => false
     t.integer  "contact_id",                                       :null => false
     t.string   "shareable_type", :limit => 60, :default => "Post", :null => false
@@ -382,8 +382,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
   create_table "tag_followings", :force => true do |t|
     t.integer  "tag_id",     :null => false
     t.integer  "user_id",    :null => false
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at", :null => false
+    t.datetime "updated_at", :null => false
   end
 
   add_index "tag_followings", ["tag_id", "user_id"], :name => "index_tag_followings_on_tag_id_and_user_id", :unique => true
@@ -414,8 +414,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
   create_table "user_preferences", :force => true do |t|
     t.string   "email_type"
     t.integer  "user_id"
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at", :null => false
+    t.datetime "updated_at", :null => false
   end
 
   create_table "users", :force => true do |t|
@@ -436,8 +436,8 @@ ActiveRecord::Schema.define(:version => 20120521191429) do
     t.datetime "last_sign_in_at"
     t.string   "current_sign_in_ip"
     t.string   "last_sign_in_ip"
-    t.datetime "created_at"
-    t.datetime "updated_at"
+    t.datetime "created_at",                                                           :null => false
+    t.datetime "updated_at",                                                           :null => false
     t.string   "invitation_service",                 :limit => 127
     t.string   "invitation_identifier",              :limit => 127
     t.integer  "invitation_limit"
diff --git a/db/seeds.rb b/db/seeds.rb
index 09529e8c5e..8fa88259be 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -41,9 +41,12 @@ connect_users(bob, bob.aspects.first, alice, alice.aspects.first)
 connect_users(bob, bob.aspects.first, eve, eve.aspects.first)
 puts "done!"
 
-
+print "making Bob an admin and beta... "
+Role.add_beta(bob.person)
+Role.add_admin(bob.person)
 puts "done!"
 
+
 require File.join(File.dirname(__FILE__), '..', 'spec', 'support', 'fake_resque')
 require File.join(File.dirname(__FILE__), '..', 'spec', 'support', 'user_methods')
 
-- 
GitLab