enju_bookmark 0.0.18 → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/enju_bookmark/version.rb +1 -1
- data/spec/dummy/config/application.rb +1 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/032_create_checkins.rb +17 -0
- data/spec/dummy/db/migrate/033_create_checkouts.rb +25 -0
- data/spec/dummy/db/migrate/035_create_reserves.rb +27 -0
- data/spec/dummy/db/migrate/120_create_baskets.rb +12 -0
- data/spec/dummy/db/migrate/121_create_checked_items.rb +17 -0
- data/spec/dummy/db/migrate/20081030023518_create_user_group_has_checkout_types.rb +25 -0
- data/spec/dummy/db/migrate/20081030023615_create_carrier_type_has_checkout_types.rb +18 -0
- data/spec/dummy/db/migrate/20081212075554_create_checkout_stat_has_manifestations.rb +17 -0
- data/spec/dummy/db/migrate/20081212080038_create_manifestation_checkout_stats.rb +16 -0
- data/spec/dummy/db/migrate/20081215094302_create_user_checkout_stats.rb +16 -0
- data/spec/dummy/db/migrate/20081215094955_create_checkout_stat_has_users.rb +17 -0
- data/spec/dummy/db/migrate/20081216190517_create_reserve_stat_has_manifestations.rb +17 -0
- data/spec/dummy/db/migrate/20081216190724_create_manifestation_reserve_stats.rb +16 -0
- data/spec/dummy/db/migrate/20081220023628_create_user_reserve_stats.rb +16 -0
- data/spec/dummy/db/migrate/20081220034117_create_reserve_stat_has_users.rb +17 -0
- data/spec/dummy/db/migrate/20090321130448_add_completed_at_to_user_checkout_stat.rb +27 -0
- data/spec/dummy/db/migrate/20090831220301_create_lending_policies.rb +21 -0
- data/spec/dummy/db/migrate/20110301134521_add_expire_date_to_reserve.rb +9 -0
- data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +13 -0
- data/spec/dummy/db/migrate/20110328130826_add_current_checkout_count_to_user_group_has_checkout_type.rb +9 -0
- data/spec/dummy/db/migrate/20110621093332_remove_expire_date_from_reserve.rb +9 -0
- data/spec/dummy/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +13 -0
- data/spec/dummy/db/migrate/20111217234412_add_save_checkout_history_to_user.rb +5 -0
- data/spec/dummy/db/migrate/20111218002349_add_checkout_icalendar_token_to_user.rb +6 -0
- data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +14 -0
- data/spec/dummy/db/migrate/20120424103932_add_librarian_id_to_checked_item.rb +5 -0
- data/spec/dummy/db/schema.rb +288 -62
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/enju_leaf.rb +1 -0
- data/spec/dummy/lib/enju_leaf/import_file.rb +13 -0
- data/spec/dummy/solr/data/test/index/_0.fdt +0 -0
- data/spec/dummy/solr/data/test/index/_0.fdx +0 -0
- data/spec/dummy/solr/data/test/index/_0.fnm +3 -0
- data/spec/dummy/solr/data/test/index/_0.frq +0 -0
- data/spec/dummy/solr/data/test/index/_0.nrm +1 -0
- data/spec/dummy/solr/data/test/index/_0.prx +0 -0
- data/spec/dummy/solr/data/test/index/_0.tii +0 -0
- data/spec/dummy/solr/data/test/index/_0.tis +0 -0
- data/spec/dummy/solr/data/test/index/segments.gen +0 -0
- data/spec/dummy/solr/data/test/index/segments_2 +0 -0
- data/spec/dummy/solr/data/test/spellchecker/segments_1 +0 -0
- metadata +92 -8
- data/spec/dummy/app/models/checkout_type.rb +0 -32
- data/spec/dummy/app/models/circulation_status.rb +0 -21
- data/spec/dummy/solr/data/test/index/segments_1 +0 -0
File without changes
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreateCheckins < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :checkins do |t|
|
4
|
+
t.integer :item_id, :null => false
|
5
|
+
t.integer :librarian_id
|
6
|
+
t.integer :basket_id
|
7
|
+
t.timestamps
|
8
|
+
end
|
9
|
+
add_index :checkins, :item_id
|
10
|
+
add_index :checkins, :librarian_id
|
11
|
+
add_index :checkins, :basket_id
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.down
|
15
|
+
drop_table :checkins
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
class CreateCheckouts < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :checkouts do |t|
|
4
|
+
t.integer :user_id
|
5
|
+
t.integer :item_id, :null => false
|
6
|
+
t.integer :checkin_id
|
7
|
+
t.integer :librarian_id
|
8
|
+
t.integer :basket_id
|
9
|
+
t.datetime :due_date
|
10
|
+
t.integer :checkout_renewal_count, :default => 0, :null => false
|
11
|
+
t.integer :lock_version, :default => 0, :null => false
|
12
|
+
t.timestamps
|
13
|
+
end
|
14
|
+
add_index :checkouts, :user_id
|
15
|
+
add_index :checkouts, :item_id
|
16
|
+
add_index :checkouts, :basket_id
|
17
|
+
add_index :checkouts, [:item_id, :basket_id], :unique => true
|
18
|
+
add_index :checkouts, :librarian_id
|
19
|
+
add_index :checkouts, :checkin_id
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.down
|
23
|
+
drop_table :checkouts
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
class CreateReserves < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :reserves do |t|
|
4
|
+
t.integer :user_id, :null => false
|
5
|
+
t.integer :manifestation_id, :null => false
|
6
|
+
t.integer :item_id
|
7
|
+
t.integer :request_status_type_id, :null => false
|
8
|
+
t.datetime :checked_out_at
|
9
|
+
t.timestamps
|
10
|
+
t.datetime :canceled_at
|
11
|
+
t.datetime :expired_at
|
12
|
+
t.datetime :deleted_at
|
13
|
+
t.string :state
|
14
|
+
t.boolean :expiration_notice_to_patron, :default => false
|
15
|
+
t.boolean :expiration_notice_to_library, :default => false
|
16
|
+
end
|
17
|
+
|
18
|
+
add_index :reserves, :user_id
|
19
|
+
add_index :reserves, :manifestation_id
|
20
|
+
add_index :reserves, :item_id
|
21
|
+
add_index :reserves, :request_status_type_id
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.down
|
25
|
+
drop_table :reserves
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreateCheckedItems < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :checked_items do |t|
|
4
|
+
t.integer :item_id, :null => false
|
5
|
+
t.integer :basket_id, :null => false
|
6
|
+
t.datetime :due_date, :null => false
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
add_index :checked_items, :item_id
|
11
|
+
add_index :checked_items, :basket_id
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.down
|
15
|
+
drop_table :checked_items
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
class CreateUserGroupHasCheckoutTypes < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :user_group_has_checkout_types do |t|
|
4
|
+
t.integer :user_group_id, :null => false
|
5
|
+
t.integer :checkout_type_id, :null => false
|
6
|
+
t.integer :checkout_limit, :default => 0, :null => false
|
7
|
+
t.integer :checkout_period, :default => 0, :null => false
|
8
|
+
t.integer :checkout_renewal_limit, :default => 0, :null => false
|
9
|
+
t.integer :reservation_limit, :default => 0, :null => false
|
10
|
+
t.integer :reservation_expired_period, :default => 7, :null => false
|
11
|
+
t.boolean :set_due_date_before_closing_day, :default => false, :null => false
|
12
|
+
t.datetime :fixed_due_date
|
13
|
+
t.text :note
|
14
|
+
t.integer :position
|
15
|
+
|
16
|
+
t.timestamps
|
17
|
+
end
|
18
|
+
add_index :user_group_has_checkout_types, :user_group_id
|
19
|
+
add_index :user_group_has_checkout_types, :checkout_type_id
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.down
|
23
|
+
drop_table :user_group_has_checkout_types
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class CreateCarrierTypeHasCheckoutTypes < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :carrier_type_has_checkout_types do |t|
|
4
|
+
t.integer :carrier_type_id, :null => false
|
5
|
+
t.integer :checkout_type_id, :null => false
|
6
|
+
t.text :note
|
7
|
+
t.integer :position
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
add_index :carrier_type_has_checkout_types, :carrier_type_id, :name => 'index_carrier_type_has_checkout_types_on_m_form_id'
|
12
|
+
add_index :carrier_type_has_checkout_types, :checkout_type_id
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.down
|
16
|
+
drop_table :carrier_type_has_checkout_types
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreateCheckoutStatHasManifestations < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :checkout_stat_has_manifestations do |t|
|
4
|
+
t.integer :manifestation_checkout_stat_id, :null => false
|
5
|
+
t.integer :manifestation_id, :null => false
|
6
|
+
t.integer :checkouts_count
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
add_index :checkout_stat_has_manifestations, :manifestation_checkout_stat_id, :name => 'index_checkout_stat_has_manifestations_on_checkout_stat_id'
|
11
|
+
add_index :checkout_stat_has_manifestations, :manifestation_id, :name => 'index_checkout_stat_has_manifestations_on_manifestation_id'
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.down
|
15
|
+
drop_table :checkout_stat_has_manifestations
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateManifestationCheckoutStats < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :manifestation_checkout_stats do |t|
|
4
|
+
t.datetime :start_date
|
5
|
+
t.datetime :end_date
|
6
|
+
t.text :note
|
7
|
+
t.string :state
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.down
|
14
|
+
drop_table :manifestation_checkout_stats
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateUserCheckoutStats < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :user_checkout_stats do |t|
|
4
|
+
t.datetime :start_date
|
5
|
+
t.datetime :end_date
|
6
|
+
t.text :note
|
7
|
+
t.string :state
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.down
|
14
|
+
drop_table :user_checkout_stats
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreateCheckoutStatHasUsers < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :checkout_stat_has_users do |t|
|
4
|
+
t.integer :user_checkout_stat_id, :null => false
|
5
|
+
t.integer :user_id, :null => false
|
6
|
+
t.integer :checkouts_count, :default => 0, :null => false
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
add_index :checkout_stat_has_users, :user_checkout_stat_id
|
11
|
+
add_index :checkout_stat_has_users, :user_id
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.down
|
15
|
+
drop_table :checkout_stat_has_users
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreateReserveStatHasManifestations < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :reserve_stat_has_manifestations do |t|
|
4
|
+
t.integer :manifestation_reserve_stat_id, :null => false
|
5
|
+
t.integer :manifestation_id, :null => false
|
6
|
+
t.integer :reserves_count
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
add_index :reserve_stat_has_manifestations, :manifestation_reserve_stat_id, :name => 'index_reserve_stat_has_manifestations_on_m_reserve_stat_id'
|
11
|
+
add_index :reserve_stat_has_manifestations, :manifestation_id
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.down
|
15
|
+
drop_table :reserve_stat_has_manifestations
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateManifestationReserveStats < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :manifestation_reserve_stats do |t|
|
4
|
+
t.datetime :start_date
|
5
|
+
t.datetime :end_date
|
6
|
+
t.text :note
|
7
|
+
t.string :state
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.down
|
14
|
+
drop_table :manifestation_reserve_stats
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateUserReserveStats < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :user_reserve_stats do |t|
|
4
|
+
t.datetime :start_date
|
5
|
+
t.datetime :end_date
|
6
|
+
t.text :note
|
7
|
+
t.string :state
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.down
|
14
|
+
drop_table :user_reserve_stats
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class CreateReserveStatHasUsers < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :reserve_stat_has_users do |t|
|
4
|
+
t.integer :user_reserve_stat_id, :null => false
|
5
|
+
t.integer :user_id, :null => false
|
6
|
+
t.integer :reserves_count
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
add_index :reserve_stat_has_users, :user_reserve_stat_id
|
11
|
+
add_index :reserve_stat_has_users, :user_id
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.down
|
15
|
+
drop_table :reserve_stat_has_users
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
class AddCompletedAtToUserCheckoutStat < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :user_checkout_stats, :started_at, :datetime
|
4
|
+
add_column :user_checkout_stats, :completed_at, :datetime
|
5
|
+
add_index :user_checkout_stats, :state
|
6
|
+
add_column :user_reserve_stats, :started_at, :datetime
|
7
|
+
add_column :user_reserve_stats, :completed_at, :datetime
|
8
|
+
add_index :user_reserve_stats, :state
|
9
|
+
add_column :manifestation_checkout_stats, :started_at, :datetime
|
10
|
+
add_column :manifestation_checkout_stats, :completed_at, :datetime
|
11
|
+
add_index :manifestation_checkout_stats, :state
|
12
|
+
add_column :manifestation_reserve_stats, :started_at, :datetime
|
13
|
+
add_column :manifestation_reserve_stats, :completed_at, :datetime
|
14
|
+
add_index :manifestation_reserve_stats, :state
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.down
|
18
|
+
remove_column :user_checkout_stats, :started_at
|
19
|
+
remove_column :user_checkout_stats, :completed_at
|
20
|
+
remove_column :user_reserve_stats, :started_at
|
21
|
+
remove_column :user_reserve_stats, :completed_at
|
22
|
+
remove_column :manifestation_checkout_stats, :started_at
|
23
|
+
remove_column :manifestation_checkout_stats, :completed_at
|
24
|
+
remove_column :manifestation_reserve_stats, :started_at
|
25
|
+
remove_column :manifestation_reserve_stats, :completed_at
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
class CreateLendingPolicies < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :lending_policies do |t|
|
4
|
+
t.integer :item_id, :null => false
|
5
|
+
t.integer :user_group_id, :null => false
|
6
|
+
t.integer :loan_period, :default => 0, :null => false
|
7
|
+
t.datetime :fixed_due_date
|
8
|
+
t.integer :renewal, :default => 0, :null => false
|
9
|
+
t.decimal :fine, :default => 0, :null => false
|
10
|
+
t.text :note
|
11
|
+
t.integer :position
|
12
|
+
|
13
|
+
t.timestamps
|
14
|
+
end
|
15
|
+
add_index :lending_policies, [:item_id, :user_group_id], :unique => true
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.down
|
19
|
+
drop_table :lending_policies
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddValidPeriodForNewUserToUserGroup < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :user_groups, :valid_period_for_new_user, :integer, :default => 0, :null => false
|
4
|
+
add_column :user_groups, :expired_at, :timestamp
|
5
|
+
remove_column :library_groups, :valid_period_for_new_user
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.down
|
9
|
+
remove_column :user_groups, :valid_period_for_new_user
|
10
|
+
remove_column :user_groups, :expired_at
|
11
|
+
add_column :library_groups, :valid_period_for_new_user, :integer, :default => 0, :null => false
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
class AddCurrentCheckoutCountToUserGroupHasCheckoutType < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :user_group_has_checkout_types, :current_checkout_count, :integer
|
4
|
+
end
|
5
|
+
|
6
|
+
def self.down
|
7
|
+
remove_column :user_group_has_checkout_types, :current_checkout_count
|
8
|
+
end
|
9
|
+
end
|
data/spec/dummy/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
class AddNumberOfDayToNotifyOverdueToUserGroup < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :user_groups, :number_of_day_to_notify_overdue, :integer, :default => 1, :null => false
|
4
|
+
add_column :user_groups, :number_of_day_to_notify_due_date, :integer, :default => 7, :null => false
|
5
|
+
add_column :user_groups, :number_of_time_to_notify_overdue, :integer, :default => 3, :null => false
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.down
|
9
|
+
remove_column :user_groups, :number_of_time_to_notify_overdue
|
10
|
+
remove_column :user_groups, :number_of_day_to_notify_due_date
|
11
|
+
remove_column :user_groups, :number_of_day_to_notify_overdue
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateAccepts < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table :accepts do |t|
|
4
|
+
t.integer :basket_id
|
5
|
+
t.integer :item_id
|
6
|
+
t.integer :librarian_id
|
7
|
+
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
|
11
|
+
add_index :accepts, :basket_id
|
12
|
+
add_index :accepts, :item_id
|
13
|
+
end
|
14
|
+
end
|