enju_event 0.1.17.pre12 → 0.1.17.pre13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/event_import_results_controller.rb +1 -1
  3. data/app/controllers/events_controller.rb +1 -1
  4. data/app/models/event.rb +1 -1
  5. data/app/models/event_import_file.rb +5 -6
  6. data/app/models/participate.rb +5 -5
  7. data/app/views/event_import_results/show.html.erb +1 -1
  8. data/app/views/participates/edit.html.erb +2 -2
  9. data/app/views/participates/index.html.erb +2 -2
  10. data/app/views/participates/new.html.erb +2 -2
  11. data/app/views/participates/show.html.erb +2 -2
  12. data/db/migrate/20090519203307_create_participates.rb +2 -2
  13. data/lib/enju_event/version.rb +1 -1
  14. data/spec/dummy/app/controllers/application_controller.rb +4 -105
  15. data/spec/dummy/config/application.rb +2 -2
  16. data/spec/dummy/config/initializers/mime_types.rb +0 -1
  17. data/spec/dummy/db/development.sqlite3 +0 -0
  18. data/spec/dummy/db/migrate/{001_create_patrons.rb → 001_create_agents.rb} +8 -8
  19. data/spec/dummy/db/migrate/012_create_owns.rb +2 -2
  20. data/spec/dummy/db/migrate/015_create_creates.rb +2 -2
  21. data/spec/dummy/db/migrate/047_create_produces.rb +2 -2
  22. data/spec/dummy/db/migrate/059_create_libraries.rb +2 -2
  23. data/spec/dummy/db/migrate/125_create_donates.rb +2 -2
  24. data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +2 -2
  25. data/spec/dummy/db/migrate/{20080905191442_create_patron_types.rb → 20080905191442_create_agent_types.rb} +2 -2
  26. data/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +22 -0
  27. data/spec/dummy/db/migrate/{20090812151902_create_patron_relationship_types.rb → 20090812151902_create_agent_relationship_types.rb} +2 -2
  28. data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +2 -2
  29. data/spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb +13 -0
  30. data/spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb +11 -0
  31. data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +12 -0
  32. data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb +11 -0
  33. data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb +5 -0
  34. data/spec/dummy/db/migrate/20120413170720_add_error_message_to_agent_import_file.rb +5 -0
  35. data/spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb +6 -0
  36. data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb +5 -0
  37. data/spec/dummy/db/schema.rb +136 -134
  38. data/spec/dummy/db/test.sqlite3 +0 -0
  39. data/spec/dummy/private/system/event_import_files/event_imports/000/000/001/original/event_destroy_file.tsv +4 -0
  40. data/spec/dummy/private/system/event_import_files/event_imports/000/000/001/original/event_import_file_sample1.tsv +1 -1
  41. data/spec/dummy/private/system/event_import_files/event_imports/000/000/001/original/event_import_file_sample2.tsv +1 -1
  42. data/spec/dummy/private/system/event_import_files/event_imports/000/000/001/original/event_update_file.tsv +4 -0
  43. data/spec/dummy/private/system/event_import_files/event_imports/000/000/001/original/invalid_file.tsv +3 -0
  44. data/spec/dummy/solr/data/test/index/{_i4.fdt → _q6.fdt} +0 -0
  45. data/spec/dummy/solr/data/test/index/{_i4.fdx → _q6.fdx} +0 -0
  46. data/spec/dummy/solr/data/test/index/{_i4.fnm → _q6.fnm} +0 -0
  47. data/spec/dummy/solr/data/test/index/{_i4.frq → _q6.frq} +0 -0
  48. data/spec/dummy/solr/data/test/index/{_i4.nrm → _q6.nrm} +0 -0
  49. data/spec/dummy/solr/data/test/index/{_i4.prx → _q6.prx} +0 -0
  50. data/spec/dummy/solr/data/test/index/{_i4.tii → _q6.tii} +0 -0
  51. data/spec/dummy/solr/data/test/index/{_i4.tis → _q6.tis} +0 -0
  52. data/spec/dummy/solr/data/test/index/{_i5.fdt → _q7.fdt} +0 -0
  53. data/spec/dummy/solr/data/test/index/{_i5.fdx → _q7.fdx} +0 -0
  54. data/spec/dummy/solr/data/test/index/{_i5.fnm → _q7.fnm} +0 -0
  55. data/spec/dummy/solr/data/test/index/{_i5.frq → _q7.frq} +0 -0
  56. data/spec/dummy/solr/data/test/index/{_i5.nrm → _q7.nrm} +0 -0
  57. data/spec/dummy/solr/data/test/index/{_i5.prx → _q7.prx} +0 -0
  58. data/spec/dummy/solr/data/test/index/{_i5.tii → _q7.tii} +0 -0
  59. data/spec/dummy/solr/data/test/index/_q7.tis +0 -0
  60. data/spec/dummy/solr/data/test/index/segments.gen +0 -0
  61. data/spec/dummy/solr/data/test/index/segments_13d +0 -0
  62. data/spec/factories/{patron.rb → agent.rb} +3 -3
  63. data/spec/factories/participate.rb +1 -1
  64. data/spec/fixtures/{patron_types.yml → agent_types.yml} +4 -4
  65. data/spec/fixtures/{patrons.yml → agents.yml} +46 -46
  66. data/spec/fixtures/event_categories.yml +3 -3
  67. data/spec/fixtures/event_import_files.yml +1 -2
  68. data/spec/fixtures/libraries.yml +6 -6
  69. data/spec/fixtures/participates.yml +3 -3
  70. data/spec/models/event_import_file_spec.rb +1 -2
  71. data/spec/models/participate_spec.rb +1 -1
  72. metadata +92 -108
  73. data/spec/dummy/app/models/role.rb +0 -46
  74. data/spec/dummy/app/models/user_group.rb +0 -40
  75. data/spec/dummy/app/models/user_has_role.rb +0 -5
  76. data/spec/dummy/db/migrate/20081028083142_create_patron_import_files.rb +0 -22
  77. data/spec/dummy/db/migrate/20100606073747_create_patron_relationships.rb +0 -13
  78. data/spec/dummy/db/migrate/20100814091104_add_position_to_patron_relationship.rb +0 -11
  79. data/spec/dummy/db/migrate/20100925074559_create_patron_import_results.rb +0 -12
  80. data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_patron.rb +0 -11
  81. data/spec/dummy/db/migrate/20110918161853_rename_series_statement_manifestation_id_to_root_manifestation_id.rb +0 -13
  82. data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_patron_import_file.rb +0 -5
  83. data/spec/dummy/db/migrate/20120413170720_add_error_message_to_patron_import_file.rb +0 -5
  84. data/spec/dummy/db/migrate/20120415060323_rename_patron_import_file_imported_at_to_executed_at.rb +0 -9
  85. data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_patron_import_file.rb +0 -5
  86. data/spec/dummy/solr/data/test/index/_i5.tis +0 -0
  87. data/spec/dummy/solr/data/test/index/segments_ql +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 75cfb7a9dccdda17e0a3e2656b365a732f90f5ba
4
- data.tar.gz: 02871690112a62a925adc55d8f6516b897626ccc
3
+ metadata.gz: f41f516c5391f7a1a2b5ce7a0a6a8044dac7d586
4
+ data.tar.gz: fb4f0d3d2332c7be954fe65b551119a7225fd021
5
5
  SHA512:
6
- metadata.gz: 6410ff81fd6ee4dbd3ef87a727d887e607b95450d22024ebc3f2e14fb12ac4a9e2783ecc78c4f0f7753e0664dac0e08c4839f554c8372fbc2626c1bf124df9a6
7
- data.tar.gz: 9d889993b2e13f5b74e5a1612b2addb3fab5e71f477b87ff4afdbf57a99d50ca9f3bc8be14ee09f9f4eceb431ff483d49250bd68959a0cf6e8bbaaf4e1cf5af4
6
+ metadata.gz: aa323aee02ec299ec2f5678ab675aed4c9fc9543fe9e73116b7cb9bf21d33a9ff51f1ca3e6f6a8a2e82dc3e9824d945a2895a4de81e4944d923e96a89a9e6b21
7
+ data.tar.gz: 03dd7c320eaa9c4b04342a2bfb4856682cd65dfc1dc4bfdc2a906ebad59a291302b476c2add062c4bed857296f8b4f6935b2cf1b3b9e624d5b80effc8c04fbc4
@@ -9,7 +9,7 @@ class EventImportResultsController < InheritedResources::Base
9
9
  if @event_import_file
10
10
  @event_import_results = @event_import_file.event_import_results.page(params[:page])
11
11
  else
12
- @event_import_results = @event_import_results.page(params[:page])
12
+ @event_import_results = EventImportResult.page(params[:page])
13
13
  end
14
14
  end
15
15
  end
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  class EventsController < ApplicationController
3
3
  load_and_authorize_resource
4
- before_filter :get_library, :get_patron
4
+ before_filter :get_library, :get_agent
5
5
  before_filter :get_libraries, :except => :destroy
6
6
  before_filter :prepare_options
7
7
  before_filter :store_page, :only => :index
data/app/models/event.rb CHANGED
@@ -13,7 +13,7 @@ class Event < ActiveRecord::Base
13
13
  belongs_to :library, :validate => true
14
14
  has_many :picture_files, :as => :picture_attachable
15
15
  has_many :participates, :dependent => :destroy
16
- has_many :patrons, :through => :participates
16
+ has_many :agents, :through => :participates
17
17
  has_one :event_import_result
18
18
 
19
19
  has_event_calendar
@@ -36,12 +36,12 @@ class EventImportFile < ActiveRecord::Base
36
36
  transition :started => :failed
37
37
  end
38
38
 
39
- before_transition any => :started do |patron_import_file|
40
- patron_import_file.executed_at = Time.zone.now
39
+ before_transition any => :started do |agent_import_file|
40
+ agent_import_file.executed_at = Time.zone.now
41
41
  end
42
42
 
43
- before_transition any => :completed do |patron_import_file|
44
- patron_import_file.error_message = nil
43
+ before_transition any => :completed do |agent_import_file|
44
+ agent_import_file.error_message = nil
45
45
  end
46
46
  end
47
47
 
@@ -232,10 +232,9 @@ end
232
232
  # event_import_file_size :integer
233
233
  # event_import_updated_at :datetime
234
234
  # edit_mode :string(255)
235
- # event_import_fingerprint :string(255)
236
235
  # created_at :datetime not null
237
236
  # updated_at :datetime not null
238
- # event_fingerprint :string(255)
237
+ # event_import_fingerprint :string(255)
239
238
  # error_message :text
240
239
  #
241
240
 
@@ -1,10 +1,10 @@
1
1
  class Participate < ActiveRecord::Base
2
- attr_accessible :patron_id, :event_id
3
- belongs_to :patron
2
+ attr_accessible :agent_id, :event_id
3
+ belongs_to :agent
4
4
  belongs_to :event
5
5
 
6
- validates_presence_of :patron_id, :event_id
7
- validates_uniqueness_of :patron_id, :scope => :event_id
6
+ validates_presence_of :agent_id, :event_id
7
+ validates_uniqueness_of :agent_id, :scope => :event_id
8
8
  acts_as_list :scope => :event_id
9
9
 
10
10
  paginates_per 10
@@ -15,7 +15,7 @@ end
15
15
  # Table name: participates
16
16
  #
17
17
  # id :integer not null, primary key
18
- # patron_id :integer not null
18
+ # agent_id :integer not null
19
19
  # event_id :integer not null
20
20
  # position :integer
21
21
  # created_at :datetime not null
@@ -14,7 +14,7 @@
14
14
  </p>
15
15
 
16
16
  <p>
17
- <b><%= t('activerecord.attributes.patron_import_result.body') %></b>
17
+ <b><%= t('activerecord.attributes.agent_import_result.body') %></b>
18
18
  <%= @event_import_result.body %>
19
19
  </p>
20
20
 
@@ -6,8 +6,8 @@
6
6
  <%= f.error_messages %>
7
7
 
8
8
  <div class="field">
9
- <%= f.label t('activerecord.models.patron') -%><br />
10
- <%= f.text_field :patron_id %>
9
+ <%= f.label t('activerecord.models.agent') -%><br />
10
+ <%= f.text_field :agent_id %>
11
11
  </div>
12
12
  <div class="field">
13
13
  <%= f.label t('activerecord.models.event') -%><br />
@@ -4,13 +4,13 @@
4
4
 
5
5
  <table class="table table-striped index">
6
6
  <tr>
7
- <th><%= t('activerecord.models.patron') -%></th>
7
+ <th><%= t('activerecord.models.agent') -%></th>
8
8
  <th><%= t('activerecord.models.event') -%></th>
9
9
  </tr>
10
10
 
11
11
  <%- @participates.each do |participate| %>
12
12
  <tr class="line<%= cycle("0", "1") -%>">
13
- <td><%= link_to participate.patron.full_name, participate.patron %>
13
+ <td><%= link_to participate.agent.full_name, participate.agent %>
14
14
  <td><%= link_to participate.event.display_name.localize, participate.event %>
15
15
  <td><%= link_to t('page.show'), participate %></td>
16
16
  <td><%= link_to t('page.edit'), edit_participate_path(participate) %></td>
@@ -6,8 +6,8 @@
6
6
  <%= f.error_messages %>
7
7
 
8
8
  <div class="field">
9
- <%= f.label t('activerecord.models.patron') -%><br />
10
- <%= f.text_field :patron_id %>
9
+ <%= f.label t('activerecord.models.agent') -%><br />
10
+ <%= f.text_field :agent_id %>
11
11
  </div>
12
12
  <div class="field">
13
13
  <%= f.label t('activerecord.models.event') -%><br />
@@ -4,8 +4,8 @@
4
4
  <p id="notice"><%= notice %></p>
5
5
 
6
6
  <p>
7
- <strong><%= t('activerecord.models.patron') -%>:</strong>
8
- <%= link_to @participate.patron.full_name, @participate.patron %>
7
+ <strong><%= t('activerecord.models.agent') -%>:</strong>
8
+ <%= link_to @participate.agent.full_name, @participate.agent %>
9
9
  </p>
10
10
 
11
11
  <p>
@@ -1,14 +1,14 @@
1
1
  class CreateParticipates < ActiveRecord::Migration
2
2
  def self.up
3
3
  create_table :participates do |t|
4
- t.integer :patron_id, :null => false
4
+ t.integer :agent_id, :null => false
5
5
  t.integer :event_id, :null => false
6
6
  t.integer :position
7
7
 
8
8
  t.timestamps
9
9
  end
10
10
  add_index :participates, :event_id
11
- add_index :participates, :patron_id
11
+ add_index :participates, :agent_id
12
12
  end
13
13
 
14
14
  def self.down
@@ -1,3 +1,3 @@
1
1
  module EnjuEvent
2
- VERSION = "0.1.17.pre12"
2
+ VERSION = "0.1.17.pre13"
3
3
  end
@@ -1,108 +1,7 @@
1
1
  class ApplicationController < ActionController::Base
2
2
  protect_from_forgery
3
- include Mobylette::RespondToMobileRequests
4
-
5
- rescue_from CanCan::AccessDenied, :with => :render_403
6
- rescue_from ActiveRecord::RecordNotFound, :with => :render_404
7
-
8
- before_filter :set_locale
9
-
10
- private
11
- def render_403
12
- return if performed?
13
- if user_signed_in?
14
- respond_to do |format|
15
- format.html {render :template => 'page/403', :status => 403}
16
- format.mobile {render :template => 'page/403', :status => 403}
17
- format.xml {render :template => 'page/403', :status => 403}
18
- format.json
19
- end
20
- else
21
- respond_to do |format|
22
- format.html {redirect_to new_user_session_url}
23
- format.mobile {redirect_to new_user_session_url}
24
- format.xml {render :template => 'page/403', :status => 403}
25
- format.json
26
- end
27
- end
28
- end
29
-
30
- def render_404
31
- return if performed?
32
- respond_to do |format|
33
- format.html {render :template => 'page/404', :status => 404}
34
- format.mobile {render :template => 'page/404', :status => 404}
35
- format.xml {render :template => 'page/404', :status => 404}
36
- format.json
37
- end
38
- end
39
-
40
- def get_patron
41
- @patron = Patron.find(params[:patron_id]) if params[:patron_id]
42
- authorize! :show, @patron if @patron
43
- end
44
-
45
- def get_library
46
- @library = Library.find(params[:library_id]) if params[:library_id]
47
- end
48
-
49
- def get_libraries
50
- @libraries = Library.all_cache
51
- end
52
-
53
- def set_locale
54
- if params[:locale]
55
- unless I18n.available_locales.include?(params[:locale].to_s.intern)
56
- raise InvalidLocaleError
57
- end
58
- end
59
- if user_signed_in?
60
- locale = params[:locale] || session[:locale] || current_user.locale.try(:to_sym)
61
- else
62
- locale = params[:locale] || session[:locale]
63
- end
64
- if locale
65
- I18n.locale = @locale = session[:locale] = locale.to_sym
66
- else
67
- I18n.locale = @locale = session[:locale] = I18n.default_locale
68
- end
69
- rescue InvalidLocaleError
70
- @locale = I18n.default_locale
71
- end
72
-
73
- def solr_commit
74
- Sunspot.commit
75
- end
76
-
77
- def convert_charset
78
- case params[:format]
79
- when 'csv'
80
- return unless Setting.csv_charset_conversion
81
- # TODO: 他の言語
82
- if @locale.to_sym == :ja
83
- headers["Content-Type"] = "text/csv; charset=Shift_JIS"
84
- response.body = NKF::nkf('-Ws', response.body)
85
- end
86
- when 'xml'
87
- if @locale.to_sym == :ja
88
- headers["Content-Type"] = "application/xml; charset=Shift_JIS"
89
- response.body = NKF::nkf('-Ws', response.body)
90
- end
91
- end
92
- end
93
-
94
- def store_page
95
- flash[:page] = params[:page] if params[:page].to_i > 0
96
- end
97
-
98
- def move_position(resource, direction)
99
- if ['higher', 'lower'].include?(direction)
100
- resource.send("move_#{direction}")
101
- redirect_to url_for(:controller => resource.class.to_s.pluralize.underscore)
102
- return
103
- end
104
- end
105
- end
106
-
107
- class InvalidLocaleError < StandardError
3
+ enju_leaf
4
+ enju_biblio
5
+ enju_library
6
+ enju_event
108
7
  end
@@ -3,6 +3,7 @@ require File.expand_path('../boot', __FILE__)
3
3
  require 'rails/all'
4
4
 
5
5
  Bundler.require
6
+ require 'enju_event'
6
7
 
7
8
  module Dummy
8
9
  class Application < Rails::Application
@@ -42,6 +43,5 @@ module Dummy
42
43
  end
43
44
  end
44
45
 
45
- require 'enju_biblio'
46
- require 'enju_library'
46
+ require 'enju_leaf'
47
47
  require 'mobylette'
@@ -3,4 +3,3 @@
3
3
  # Add new mime types for use in respond_to blocks:
4
4
  # Mime::Type.register "text/richtext", :rtf
5
5
  # Mime::Type.register_alias "text/html", :iphone
6
- Mime::Type.register "application/octet-stream", :download
Binary file
@@ -1,6 +1,6 @@
1
- class CreatePatrons < ActiveRecord::Migration
1
+ class CreateAgents < ActiveRecord::Migration
2
2
  def change
3
- create_table :patrons do |t|
3
+ create_table :agents do |t|
4
4
  t.integer :user_id
5
5
  t.string :last_name
6
6
  t.string :middle_name
@@ -35,7 +35,7 @@ class CreatePatrons < ActiveRecord::Migration
35
35
  t.datetime :date_of_death
36
36
  t.integer :language_id, :default => 1, :null => false
37
37
  t.integer :country_id, :default => 1, :null => false
38
- t.integer :patron_type_id, :default => 1, :null => false
38
+ t.integer :agent_type_id, :default => 1, :null => false
39
39
  t.integer :lock_version, :default => 0, :null => false
40
40
  t.text :note
41
41
  t.integer :required_role_id, :default => 1, :null => false
@@ -44,10 +44,10 @@ class CreatePatrons < ActiveRecord::Migration
44
44
  t.text :email
45
45
  t.text :url
46
46
  end
47
- add_index :patrons, :user_id, :unique => true
48
- add_index :patrons, :language_id
49
- add_index :patrons, :country_id
50
- add_index :patrons, :required_role_id
51
- add_index :patrons, :full_name
47
+ add_index :agents, :user_id, :unique => true
48
+ add_index :agents, :language_id
49
+ add_index :agents, :country_id
50
+ add_index :agents, :required_role_id
51
+ add_index :agents, :full_name
52
52
  end
53
53
  end
@@ -1,12 +1,12 @@
1
1
  class CreateOwns < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :owns do |t|
4
- t.references :patron, :null => false
4
+ t.references :agent, :null => false
5
5
  t.references :item, :null => false
6
6
  t.integer :position
7
7
  t.timestamps
8
8
  end
9
- add_index :owns, :patron_id
9
+ add_index :owns, :agent_id
10
10
  add_index :owns, :item_id
11
11
  end
12
12
  end
@@ -1,12 +1,12 @@
1
1
  class CreateCreates < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :creates do |t|
4
- t.references :patron, :null => false
4
+ t.references :agent, :null => false
5
5
  t.references :work, :null => false
6
6
  t.integer :position
7
7
  t.timestamps
8
8
  end
9
- add_index :creates, :patron_id
9
+ add_index :creates, :agent_id
10
10
  add_index :creates, :work_id
11
11
  end
12
12
  end
@@ -1,12 +1,12 @@
1
1
  class CreateProduces < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :produces do |t|
4
- t.references :patron, :null => false
4
+ t.references :agent, :null => false
5
5
  t.references :manifestation, :null => false
6
6
  t.integer :position
7
7
  t.timestamps
8
8
  end
9
- add_index :produces, :patron_id
9
+ add_index :produces, :agent_id
10
10
  add_index :produces, :manifestation_id
11
11
  end
12
12
  end
@@ -1,7 +1,7 @@
1
1
  class CreateLibraries < ActiveRecord::Migration
2
2
  def self.up
3
3
  create_table :libraries do |t|
4
- t.references :patron, :polymorphic => true
4
+ t.references :agent, :polymorphic => true
5
5
  t.string :name, :null => false
6
6
  t.text :display_name
7
7
  t.string :short_display_name, :null => false
@@ -23,7 +23,7 @@ class CreateLibraries < ActiveRecord::Migration
23
23
  t.timestamps
24
24
  t.datetime :deleted_at
25
25
  end
26
- add_index :libraries, :patron_id, :unique => true
26
+ add_index :libraries, :agent_id, :unique => true
27
27
  add_index :libraries, :library_group_id
28
28
  add_index :libraries, :name, :unique => true
29
29
  end
@@ -1,12 +1,12 @@
1
1
  class CreateDonates < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :donates do |t|
4
- t.integer :patron_id, :null => false
4
+ t.integer :agent_id, :null => false
5
5
  t.integer :item_id, :null => false
6
6
 
7
7
  t.timestamps
8
8
  end
9
- add_index :donates, :patron_id
9
+ add_index :donates, :agent_id
10
10
  add_index :donates, :item_id
11
11
  end
12
12
  end
@@ -1,13 +1,13 @@
1
1
  class CreateRealizes < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :realizes do |t|
4
- t.references :patron, :null => false
4
+ t.references :agent, :null => false
5
5
  t.references :expression, :null => false
6
6
  t.integer :position
7
7
 
8
8
  t.timestamps
9
9
  end
10
- add_index :realizes, :patron_id
10
+ add_index :realizes, :agent_id
11
11
  add_index :realizes, :expression_id
12
12
  end
13
13
  end