active_record-mti 0.3.2 → 0.4.0.pre.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -6
- data/{LICENSE.txt → LICENSE} +0 -0
- data/README.md +47 -10
- data/lib/active_record/mti.rb +56 -56
- data/lib/active_record/mti/config.rb +26 -0
- data/lib/active_record/mti/connection_adapters/postgresql/adapter.rb +0 -8
- data/lib/active_record/mti/connection_adapters/postgresql/schema_statements.rb +30 -11
- data/lib/active_record/mti/core_extension.rb +170 -0
- data/lib/active_record/mti/railtie.rb +9 -4
- data/lib/active_record/mti/relation.rb +95 -0
- data/lib/active_record/mti/schema_dumper.rb +4 -4
- data/lib/active_record/mti/table.rb +19 -0
- data/lib/active_record/mti/table_oid.rb +6 -0
- data/lib/active_record/mti/version.rb +1 -1
- data/lib/core_ext/array.rb +14 -0
- data/lib/core_ext/hash.rb +1 -3
- data/lib/core_ext/thread.rb +14 -0
- metadata +94 -95
- data/.gitignore +0 -78
- data/.rspec +0 -2
- data/.travis.yml +0 -38
- data/Gemfile +0 -21
- data/Rakefile +0 -6
- data/active_record-mti.gemspec +0 -42
- data/gemfiles/activerecord-4.0.Gemfile +0 -3
- data/gemfiles/activerecord-4.1.Gemfile +0 -3
- data/gemfiles/activerecord-4.2.Gemfile +0 -3
- data/gemfiles/activerecord-5.0.Gemfile +0 -3
- data/gemfiles/activerecord-5.1.Gemfile +0 -3
- data/lib/active_record/mti/calculations.rb +0 -23
- data/lib/active_record/mti/inheritance.rb +0 -127
- data/lib/active_record/mti/model_schema.rb +0 -55
- data/lib/active_record/mti/query_methods.rb +0 -40
- data/lib/active_record/mti/querying.rb +0 -7
- data/lib/active_record/mti/registry.rb +0 -23
- data/spec/active_record/mti/calculations_spec.rb +0 -56
- data/spec/active_record/mti/inheritance_spec.rb +0 -184
- data/spec/active_record/mti/model_schema_spec.rb +0 -11
- data/spec/active_record/mti/query_methods_spec.rb +0 -12
- data/spec/active_record/mti/schema_dumper_spec.rb +0 -22
- data/spec/active_record/mti_spec.rb +0 -24
- data/spec/active_record/sti/inheritance_spec.rb +0 -24
- data/spec/spec_helper.rb +0 -28
- data/spec/support/rails/app/models/admin.rb +0 -3
- data/spec/support/rails/app/models/comment.rb +0 -4
- data/spec/support/rails/app/models/post.rb +0 -4
- data/spec/support/rails/app/models/transportation/military/vehicle.rb +0 -7
- data/spec/support/rails/app/models/transportation/truck.rb +0 -5
- data/spec/support/rails/app/models/transportation/vehicle.rb +0 -4
- data/spec/support/rails/app/models/user.rb +0 -6
- data/spec/support/rails/config/database.yml +0 -4
- data/spec/support/rails/config/routes.rb +0 -3
- data/spec/support/rails/db/schema.rb +0 -51
- data/spec/support/rails/log/.gitignore +0 -1
- data/spec/support/rails/public/favicon.ico +0 -0
@@ -1,51 +0,0 @@
|
|
1
|
-
ActiveRecord::Schema.define do
|
2
|
-
|
3
|
-
enable_extension 'pgcrypto'
|
4
|
-
enable_extension "uuid-ossp"
|
5
|
-
|
6
|
-
self.verbose = false
|
7
|
-
|
8
|
-
create_table :users, schema: :public, force: true do |t|
|
9
|
-
t.string :email, index: :btree
|
10
|
-
t.timestamps null: false
|
11
|
-
end
|
12
|
-
|
13
|
-
create_table :admins, force: true, inherits: :users do |t|
|
14
|
-
t.integer :god_powers
|
15
|
-
end
|
16
|
-
|
17
|
-
create_table 'admin/hackers', force: true, inherits: :admins do |t|
|
18
|
-
t.integer :god_powers
|
19
|
-
end
|
20
|
-
|
21
|
-
create_table :posts, id: :bigserial, force: true do |t|
|
22
|
-
t.integer :user_id
|
23
|
-
t.string :title
|
24
|
-
t.timestamps null: false
|
25
|
-
end
|
26
|
-
|
27
|
-
create_table :post_tags, id: :bigserial, default: nil, primary_key: :post_id, force: true do |t|
|
28
|
-
t.string :title
|
29
|
-
t.timestamps null: false
|
30
|
-
end
|
31
|
-
|
32
|
-
create_table :comments, force: true do |t|
|
33
|
-
t.integer :user_id
|
34
|
-
t.integer :post_id
|
35
|
-
t.timestamps null: false
|
36
|
-
end
|
37
|
-
|
38
|
-
#################################
|
39
|
-
### Custom Inheritance Column ###
|
40
|
-
#################################
|
41
|
-
|
42
|
-
create_table :vehicles, force: true do |t|
|
43
|
-
t.string :color
|
44
|
-
t.string :type # Inheritance column
|
45
|
-
t.timestamps null: false
|
46
|
-
end
|
47
|
-
|
48
|
-
create_table "vehicles/trucks", force: true, inherits: :vehicles do |t|
|
49
|
-
t.integer :bed_size
|
50
|
-
end
|
51
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
*.log
|
File without changes
|