Commit
8f6ac4c993c9ea0375b37ce7ca7e1c43d0da284a
Exists in
master
and in
29 other branches
add_member_task_reject_details, admin_visible_profile, article-list-template, community_notifications, contact_admin_translation, event_fixes, fix_comments_pagination, fix_rails4_organization_ratings, fix_sign_up_form, follow_step_fix, forum_topic_creation, mirror_block_improvements, multi_env_on_remote_user, new_security, noosfero_spb_ci, organization_ratings_improvements, organization_ratings_link_to_profile_stable-spb-1.3, organization_ratings_translations_fix, profile_api_improvements, ratings_minor_fixes, remote_user_fix, send_email_to_admins, stable-spb-1.3, stable-spb-1.3-fixes, stable-spb-1.4, stable-spb-1.5, suggest_rejected_value, web_steps_improvements, xss_terminate_custom_options
ActionItem6: migration renamed
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@195 3f533792-8f58-4932-b0fe-aaf55b0a4547
1
| #A enterprise is a kind of profile. According to the system concept, only enterprises can offer priducts/services |
1
| #A enterprise is a kind of profile. According to the system concept, only enterprises can offer priducts/services |
2
| class Enterprise < Profile |
2
| class Enterprise < Profile |
3
| - |
| |
4
| end |
3
| end |
| @@ -5,7 +5,7 @@ require 'digest/sha1' |
| @@ -5,7 +5,7 @@ require 'digest/sha1' |
5
| class User < ActiveRecord::Base |
5
| class User < ActiveRecord::Base |
6
| |
6
| |
7
| after_create do |user| |
7
| after_create do |user| |
8
| - Profile.create!(:identifier => user.login, :profile_owner_id => user.id, :profile_owner_type => 'User') |
8
| + Person.create!(:identifier => user.login, :profile_owner_id => user.id, :profile_owner_type => 'User') |
9
| end |
9
| end |
10
| |
10
| |
11
| has_one :personal_profile, :class_name => 'Profile', :as => :profile_owner |
11
| has_one :personal_profile, :class_name => 'Profile', :as => :profile_owner |
| @@ -0,0 +1,12 @@ |
| @@ -0,0 +1,12 @@ |
| |
1
| +class CreateAffiliations < ActiveRecord::Migration |
| |
2
| + def self.up |
| |
3
| + create_table :affiliations do |t| |
| |
4
| + t.column :user_id, :integer |
| |
5
| + t.column :profile_id, :integer |
| |
6
| + end |
| |
7
| + end |
| |
8
| + |
| |
9
| + def self.down |
| |
10
| + drop_table :affiliations |
| |
11
| + end |
| |
12
| +end |
| @@ -1,12 +0,0 @@ |
| @@ -1,12 +0,0 @@ |
1
| -class CreateAffiliations < ActiveRecord::Migration |
| |
2
| - def self.up |
| |
3
| - create_table :affiliations do |t| |
| |
4
| - t.column :user_id, :integer |
| |
5
| - t.column :profile_id, :integer |
| |
6
| - end |
| |
7
| - end |
| |
8
| - |
| |
9
| - def self.down |
| |
10
| - drop_table :affiliations |
| |
11
| - end |
| |
12
| -end |
| |
| @@ -0,0 +1,10 @@ |
| @@ -0,0 +1,10 @@ |
| |
1
| +class CreatePeople < ActiveRecord::Migration |
| |
2
| + def self.up |
| |
3
| + create_table :people do |t| |
| |
4
| + end |
| |
5
| + end |
| |
6
| + |
| |
7
| + def self.down |
| |
8
| + drop_table :people |
| |
9
| + end |
| |
10
| +end |
1
| # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html |
1
| # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html |
2
| one: |
2
| one: |
3
| id: 1 |
3
| id: 1 |
| |
4
| + name: 'Enterprise 1' |
| |
5
| + manager_id: 1 |
| |
6
| + active: false |
4
| two: |
7
| two: |
5
| id: 2 |
8
| id: 2 |