summaryrefslogtreecommitdiffstats
path: root/lib/plugins/awesome_nested_set/spec/db
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-03-26 01:47:14 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-03-26 01:47:14 +0000
commitd1057bc4ad66088d73fd48a89c9712c7dd119250 (patch)
tree87d7c7b8aac3816f1c0b680b87a4fc2a120a5d21 /lib/plugins/awesome_nested_set/spec/db
parent560bfa6d87aa4c0870b573de3a472532a0e7924b (diff)
downloadredmine-d1057bc4ad66088d73fd48a89c9712c7dd119250.tar.gz
redmine-d1057bc4ad66088d73fd48a89c9712c7dd119250.zip
import awesome_nested_set 2.1.6 (#6579)
https://github.com/collectiveidea/awesome_nested_set/commit/64cc8bc8cf93e8859a21bcf25c36675080e42ce6 git-svn-id: http://svn.redmine.org/redmine/trunk@13007 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/plugins/awesome_nested_set/spec/db')
-rw-r--r--lib/plugins/awesome_nested_set/spec/db/database.yml27
-rw-r--r--lib/plugins/awesome_nested_set/spec/db/schema.rb74
2 files changed, 101 insertions, 0 deletions
diff --git a/lib/plugins/awesome_nested_set/spec/db/database.yml b/lib/plugins/awesome_nested_set/spec/db/database.yml
new file mode 100644
index 000000000..5218975a4
--- /dev/null
+++ b/lib/plugins/awesome_nested_set/spec/db/database.yml
@@ -0,0 +1,27 @@
+sqlite3:
+ adapter: <%= "jdbc" if defined? JRUBY_VERSION %>sqlite3
+ database: awesome_nested_set.sqlite3.db
+sqlite3mem:
+ adapter: <%= "jdbc" if defined? JRUBY_VERSION %>sqlite3
+ database: ":memory:"
+postgresql:
+ adapter: postgresql
+ encoding: unicode
+ database: awesome_nested_set_plugin_test
+ pool: 5
+ username: postgres
+ password: postgres
+ min_messages: warning
+mysql:
+ adapter: mysql2
+ host: localhost
+ username: root
+ password:
+ database: awesome_nested_set_plugin_test
+## Add DB Configuration to run Oracle tests
+oracle:
+ adapter: oracle_enhanced
+ host: localhost
+ username: awesome_nested_set_dev
+ password:
+ database: xe
diff --git a/lib/plugins/awesome_nested_set/spec/db/schema.rb b/lib/plugins/awesome_nested_set/spec/db/schema.rb
new file mode 100644
index 000000000..b37322b14
--- /dev/null
+++ b/lib/plugins/awesome_nested_set/spec/db/schema.rb
@@ -0,0 +1,74 @@
+ActiveRecord::Schema.define(:version => 0) do
+
+ create_table :categories, :force => true do |t|
+ t.column :name, :string
+ t.column :parent_id, :integer
+ t.column :lft, :integer
+ t.column :rgt, :integer
+ t.column :depth, :integer
+ t.column :organization_id, :integer
+ end
+
+ create_table :departments, :force => true do |t|
+ t.column :name, :string
+ end
+
+ create_table :notes, :force => true do |t|
+ t.column :body, :text
+ t.column :parent_id, :integer
+ t.column :lft, :integer
+ t.column :rgt, :integer
+ t.column :depth, :integer
+ t.column :notable_id, :integer
+ t.column :notable_type, :string
+ end
+
+ create_table :renamed_columns, :force => true do |t|
+ t.column :name, :string
+ t.column :mother_id, :integer
+ t.column :red, :integer
+ t.column :black, :integer
+ t.column :pitch, :integer
+ end
+
+ create_table :things, :force => true do |t|
+ t.column :body, :text
+ t.column :parent_id, :integer
+ t.column :lft, :integer
+ t.column :rgt, :integer
+ t.column :depth, :integer
+ t.column :children_count, :integer
+ end
+
+ create_table :brokens, :force => true do |t|
+ t.column :name, :string
+ t.column :parent_id, :integer
+ t.column :lft, :integer
+ t.column :rgt, :integer
+ t.column :depth, :integer
+ end
+
+ create_table :orders, :force => true do |t|
+ t.column :name, :string
+ t.column :parent_id, :integer
+ t.column :lft, :integer
+ t.column :rgt, :integer
+ t.column :depth, :integer
+ end
+
+ create_table :positions, :force => true do |t|
+ t.column :name, :string
+ t.column :parent_id, :integer
+ t.column :lft, :integer
+ t.column :rgt, :integer
+ t.column :depth, :integer
+ t.column :position, :integer
+ end
+
+ create_table :no_depths, :force => true do |t|
+ t.column :name, :string
+ t.column :parent_id, :integer
+ t.column :lft, :integer
+ t.column :rgt, :integer
+ end
+end