Skip to content
Browse files

Out with the old. Wiping the slate clean for PLMConf kick-off

  • Loading branch information...
1 parent 3596772 commit caad283a3a5e0744dab3b2e9b3ba9e5ef8d51c3a @jdwyah committed May 20, 2009
View
2 app/models/association.rb
@@ -1,2 +0,0 @@
-class Association < Topic
-end
View
2 app/models/date_topic.rb
@@ -1,2 +0,0 @@
-class DateTopic < Topic
-end
View
2 app/models/entry.rb
@@ -1,2 +0,0 @@
-class Entry < Topic
-end
View
2 app/models/file_topic.rb
@@ -1,2 +0,0 @@
-class FileTopic < Topic
-end
View
2 app/models/google_doc.rb
@@ -1,2 +0,0 @@
-class GoogleDoc < Topic
-end
View
2 app/models/google_spread.rb
@@ -1,2 +0,0 @@
-class GoogleSpread < Topic
-end
View
2 app/models/location.rb
@@ -1,2 +0,0 @@
-class Location < Topic
-end
View
2 app/models/meta_date.rb
@@ -1,2 +0,0 @@
-class MetaDate < Topic
-end
View
2 app/models/meta_location.rb
@@ -1,2 +0,0 @@
-class MetaLocation < Topic
-end
View
2 app/models/meta_text.rb
@@ -1,2 +0,0 @@
-class MetaText < Topic
-end
View
2 app/models/meta_topic.rb
@@ -1,2 +0,0 @@
-class MetaTopic < Topic
-end
View
2 app/models/root.rb
@@ -1,2 +0,0 @@
-class Root < Topic
-end
View
2 app/models/see_also.rb
@@ -1,2 +0,0 @@
-class SeeAlso < Topic
-end
View
2 app/models/text_topic.rb
@@ -1,2 +0,0 @@
-class TextTopic < Topic
-end
View
5 app/models/topic.rb
@@ -1,5 +0,0 @@
-class Topic < ActiveRecord::Base
- belongs_to :user
- has_many :topics, :through => :topics_topics, :source => :to
- has_many :topics_topics, :class_name => 'TopicsTopic', :foreign_key => :from_id
-end
View
4 app/models/topics_topic.rb
@@ -1,4 +0,0 @@
-class TopicsTopic < ActiveRecord::Base
- belongs_to :to, :class_name => 'Topic', :foreign_key => 'to_id'
- belongs_to :from, :class_name => 'Topic', :foreign_key => 'from_id'
-end
View
2 app/models/weblink.rb
@@ -1,2 +0,0 @@
-class Weblink < Topic
-end
View
110 db/migrate/20090311132054_initial_schema.rb
@@ -1,110 +0,0 @@
-class InitialSchema < ActiveRecord::Migration
- def self.up
- create_table :subscriptions do |t|
- t.string :description
- t.float :price
- t.integer :max_topics
- t.timestamps
- end
-
- create_table :topics do |t|
- t.string :type
- t.integer :user_id
- t.string :title
- t.timestamp :updated_at
- t.timestamp :created_at
- t.integer :public_visible
- t.integer :subject
- t.integer :subject_id
- t.integer :latitude
- t.integer :longitude
- t.text :data
- t.string :uri
- t.string :title_lower
- end
-
-
- create_table :users do |t|
- t.string :login
- t.string :pasword
- t.string :email
- t.integer :enabled
- t.integer :supervisor
- t.integer :invitations
- t.integer :subscription_id
- t.string :paypal_id
- t.date :last_delicious_import
- t.date :last_google_apps_import
- t.timestamp :created_at
- t.timestamps
- end
-
- create_table :invitations do |t|
- t.string :email
- t.string :user_agent
- t.string :referer
- t.string :host
- t.integer :inviter_user_id
- t.integer :signup_user_id
- t.string :random_key
- t.integer :sent_email_ok
- t.timestamps
- end
-
- create_table :users_topics do |t|
- t.integer :topic_id
- t.integer :user_id
- end
-
- create_table :occurrences do |t|
- t.string :type
- t.integer :user_id
- t.string :title
- t.text :data
- t.timestamp :updated_at
- t.timestamp :created_at
- t.string :uri
- t.integer :mind_tree_id
- end
-
- create_table :subjects do |t|
- t.string :type
- t.string :foreign_id
- t.string :name
- end
-
- create_table :topics_associations do |t|
- t.integer :association_id
- t.integer :topic_id
- end
-
-
- create_table :topics_occurrences do |t|
- t.integer :occurrence_id
- t.integer :topic_id
- t.integer :latitude
- t.integer :longitude
- end
-
- create_table :topics_topics do |t|
- t.integer :from_id
- t.integer :to_id
- t.integer :latitude
- t.integer :longitude
- end
-
- end
-
- def self.down
- drop_table :subscriptions
- drop_table :topics
- drop_table :users
- drop_table :invitations
- drop_table :users_topics
- drop_table :occurrences
- drop_table :subjects
- drop_table :topics_associations
- drop_table :topics_occurrences
- drop_table :topics_topics
- end
-end
View
41 db/migrate/20090316145352_add_foreign_keys.rb
@@ -1,41 +0,0 @@
-class AddForeignKeys < ActiveRecord::Migration
- def self.up
- add_foreign_key :topics, :user_id, :users
- add_foreign_key :topics, :subject_id, :subjects
- add_foreign_key :users, :subscription_id, :subscriptions
- add_foreign_key :invitations, :inviter_user_id, :users, :id, 'invitations_users_inviter_fkey'
- add_foreign_key :invitations, :signup_user_id, :users, :id, 'invitations_users_signup_fkey'
-
- add_foreign_key :users_topics, :topic_id, :topics
- add_foreign_key :users_topics, :user_id, :users
- add_foreign_key :occurrences, :user_id, :users
-
- add_foreign_key :topics_associations, :association_id, :topics, :id, 'topics_associations_topics_association_fkey'
- add_foreign_key :topics_associations, :topic_id, :topics, :id, 'topics_associations_topics_topic_fkey'
-
- add_foreign_key :topics_occurrences, :occurrence_id, :occurrences
- add_foreign_key :topics_occurrences, :topic_id, :topics
- add_foreign_key :topics_topics, :from_id, :topics, :id, 'topics_topics_topics_from_fkey'
- add_foreign_key :topics_topics, :to_id, :topics, :id, 'topics_topics_topics_to_fkey'
- end
-
- def self.down
- remove_foreign_key :topics, :users
- remove_foreign_key :topics, :subjects
- remove_foreign_key :users, :subscriptions
- remove_foreign_key :invitations, :users, 'invitations_users_inviter_fkey'
- remove_foreign_key :invitations, :users, 'invitations_users_signup_fkey'
-
- remove_foreign_key :users_topics, :topics
- remove_foreign_key :users_topics, :users
- remove_foreign_key :occurrences, :users
-
- remove_foreign_key :topics_associations, :associations, 'topics_associations_topics_association_fkey'
- remove_foreign_key :topics_associations, :topics, 'topics_associations_topics_topic_fkey'
-
- remove_foreign_key :topics_occurrences, :occurrences
- remove_foreign_key :topics_occurrences, :topics
- remove_foreign_key :topics_topics, :topics, 'topics_topics_topics_from_fkey'
- remove_foreign_key :topics_topics, :topics, 'topics_topics_topics_to_fkey'
- end
-end
View
41 db/migrate/20090330212701_setup_auth_logic.rb
@@ -1,41 +0,0 @@
-class SetupAuthLogic < ActiveRecord::Migration
- def self.up
-
- rename_column :users, :pasword, :crypted_password
-
- add_column :users, :password_salt, :string
-
- add_column :users, :persistence_token, :string
- add_column :users, :login_count, :integer
- add_column :users, :last_request_at, :datetime
- add_column :users, :last_login_at, :datetime
- add_column :users, :current_login_at, :datetime
- add_column :users, :last_login_ip, :string
- add_column :users, :current_login_ip, :string
-
- add_column :users, :openid_identifier, :string
- add_index :users, :openid_identifier
- add_index :users, :login
-
- User.connection.execute("update users set openid_identifier = login where login like '%.%'")
-
- end
-
- def self.down
-
- rename_column :users, :crypted_password, :pasword
-
- remove_column :users, :password_salt
- remove_column :users, :persistence_token
- remove_column :users, :login_count
- remove_column :users, :last_request_at
- remove_column :users, :last_login_at
- remove_column :users, :current_login_at
- remove_column :users, :last_login_ip
- remove_column :users, :current_login_ip
-
- remove_column :users, :openid_identifier
- end
-
-
-end

0 comments on commit caad283

Please sign in to comment.
Something went wrong with that request. Please try again.