systematize 0.0.1 โ 0.0.2
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.
- checksums.yaml +4 -4
- data/README.md +62 -30
- data/lib/systematize/version.rb +1 -1
- data/lib/tasks/migrations.rake +10 -0
- data/spec/spec_helper.rb +15 -0
- data/spec/testapp/Gemfile.lock +18 -3
- data/spec/testapp/db/development.sqlite3 +0 -0
- data/spec/testapp/db/schema.rb +25 -0
- data/spec/testapp/log/development.log +82 -0
- metadata +18 -4
- data/spec/testapp/db/test.sqlite3 +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd5c0b0659f114baf943c91a9a2bf4a38c255f1a
|
4
|
+
data.tar.gz: cea63ac2678319df2f8dcc85b0874892751bfc17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 884b4ddf2e107c5b1391133fc26139687b9a23c48d5c305e91ef095ed4c30864053ae1c2587f725618fe2398e64ffec1e0fba71768155fd9d947db04882e3b3d
|
7
|
+
data.tar.gz: 976f29be93ac59ef3769342e37be708d6e9e781c518675d23d248810ad9616125dee1c5b57d252fc2014050fcb2da76685b4ce1816c8344b35c8c9209d3d3cf2
|
data/README.md
CHANGED
@@ -1,64 +1,85 @@
|
|
1
1
|
# systematize
|
2
2
|
|
3
|
-
|
3
|
+
<p align="center">
|
4
|
+
<img src="https://s15.postimg.org/jupy0v0or/shuffler.gif" width="100%" />
|
5
|
+
</p>
|
4
6
|
|
5
|
-
|
6
|
-
- Structural migrations
|
7
|
-
- Data migrations
|
8
|
-
|
9
|
-
If you want to organize said migrations in their purpose you'll probably have a folder for the struture ones and another for the data ones. But with that separation comes a problem, when should you run one type and when to run the other?
|
10
|
-
Probably the sanner way of doing it is we firstly run the structure migrations and after that we run the data migrations, but with this approach one problem will rise:
|
11
|
-
|
12
|
-
What if I have a new field that is initially populated taking into account another field, and after that we can delete that other field?
|
13
|
-
Imagine the following scenario:
|
14
|
-
- You have a `Post` model that initially has a boolean field called `:deleted`.
|
15
|
-
- After some time, and some deleted `Posts`, you need to know when that post has been deleted. So you create a `:deleted_at` field that will contain the time os the deletion.
|
16
|
-
- You can now delete the old `:deleted` field because it turned obsolete, so you create the migration to do it.
|
17
|
-
|
18
|
-
On this scenario we will have 2 structure migrations (create the `:deleted_at` field and removing the `:deleted` field) and a data migration (go through all the Posts and add the time to `:deleted_at` if they are `:deleted`). With previous migration approach, running all the migrations would fail because when the data migration run we would have the `:deleted` field because it was deleted by the structure migration.
|
7
|
+
## Why does this even exist ?
|
19
8
|
|
20
|
-
|
9
|
+
So you can seperate the data and structure migrations in different folders, because you know organization and stuff.
|
21
10
|
|
22
11
|
## Installation
|
23
12
|
|
24
|
-
If
|
25
|
-
|
13
|
+
If you're using a `Gemfile`, just add it to your project
|
14
|
+
```gemfile
|
15
|
+
#Gemfile
|
26
16
|
gem 'systematize'
|
27
|
-
|
17
|
+
```
|
28
18
|
|
29
19
|
Or just add it via `bundler`
|
30
|
-
|
20
|
+
```gemfile
|
21
|
+
bundle install 'systematize'
|
22
|
+
```
|
31
23
|
|
32
24
|
## Structure
|
33
25
|
So as the structural migrations live in the `db/migrate` folder, the data migrations shall live in the `db/data` folder:
|
34
26
|
|
35
|
-
|
27
|
+
```gemfile
|
28
|
+
- app
|
36
29
|
|
|
37
30
|
|-db
|
38
31
|
|-data
|
39
32
|
|-migrate
|
40
|
-
|
33
|
+
```
|
41
34
|
|
42
35
|
## Usage
|
43
|
-
After installing you'll
|
36
|
+
After installing you'll see the following tasks pop-up:
|
44
37
|
|
45
|
-
|
38
|
+
```bash
|
39
|
+
$> bundle exec rake -T
|
46
40
|
rake systematize:migrate # Migrate the database
|
47
41
|
rake systematize:rollback # Rollback the database (options: STEP=x, VERBOSE=false)
|
48
42
|
rake systematize:rollback_all # Rollback all the database
|
49
|
-
|
43
|
+
```
|
50
44
|
|
51
45
|
Now if you need to migrate the database you just need to run:
|
52
|
-
|
46
|
+
```bash
|
47
|
+
bundle exec rake systematize:migrate
|
48
|
+
```
|
53
49
|
|
54
50
|
Needing to rollback the previous migration? No problem.
|
55
|
-
|
51
|
+
```bash
|
52
|
+
bundle exec rake systematize:rollback
|
53
|
+
```
|
56
54
|
|
57
55
|
Need to rollback 2/3/4 migrations? I got you.
|
58
|
-
|
56
|
+
```bash
|
57
|
+
bundle exec rake systematize:rollback STEP=2
|
58
|
+
```
|
59
|
+
|
60
|
+
Made a mess so big you need to start fresh? Do it. (the migrations need to be reversible ๐
)
|
61
|
+
```bash
|
62
|
+
bundle exec rake systematize:rollback_all
|
63
|
+
```
|
59
64
|
|
60
|
-
|
61
|
-
|
65
|
+
## Why was this frankstein created ? ๐น
|
66
|
+
|
67
|
+
One of the most important things that a ruby application can have are the migrations, but they can be one of 2 kinds:
|
68
|
+
- Structural migrations
|
69
|
+
- Data migrations
|
70
|
+
|
71
|
+
If you want to organize said migrations in their purpose you'll probably have a folder for the struture ones and another for the data ones. But with that separation comes a problem, when should you run one type and when to run the other?
|
72
|
+
Probably the sanner way of doing it is we firstly run the structure migrations and after that we run the data migrations, but with this approach one problem will rise:
|
73
|
+
|
74
|
+
What if I have a new field that is initially populated taking into account another field, and after that we can delete that other field?
|
75
|
+
Imagine the following scenario:
|
76
|
+
- You have a `Post` model that initially has a boolean field called `:deleted`.
|
77
|
+
- After some time, and some deleted `Posts`, you need to know when that post has been deleted. So you create a `:deleted_at` field that will contain the time of the deletion.
|
78
|
+
- You can now delete the old `:deleted` field because it turned obsolete, so you create the migration to do it.
|
79
|
+
|
80
|
+
On this scenario we will have 2 structure migrations (create the `:deleted_at` field and removing the `:deleted` field) and a data migration (go through all the Posts and add the time to `:deleted_at` if they are `:deleted`). With previous migration approach, running all the migrations would fail because when the data migration run we wouldn't have the `:deleted` field because it was deleted by the structure migration.
|
81
|
+
|
82
|
+
This is when `systematize` comes in for the rescue ๐
|
62
83
|
|
63
84
|
## Caveats
|
64
85
|
- The migrations need to follow the Rails convention to them `YYYYMMDDHHMMSS_create_products.rb`
|
@@ -67,3 +88,14 @@ Made a mess so big you need to start fresh? Do it. (the migrations need to be re
|
|
67
88
|
## TODO
|
68
89
|
- [ ] Customizable folder configuration
|
69
90
|
- [ ] Customizable transaction type configuration
|
91
|
+
|
92
|
+
## Contributing
|
93
|
+
I welcome and encourage all pull requests. It usually will take me within 24-48 hours to respond to any issue or request. Here are some basic rules to follow to ensure timely addition of your request:
|
94
|
+
1. If its a feature, bugfix, or anything please only change code to what you specify.
|
95
|
+
2. Please keep PR titles easy to read and descriptive of changes, this will make them easier to merge :)
|
96
|
+
3. Pull requests _must_ be made against `develop` branch. Any other branch (unless specified by the maintainers) will get rejected.
|
97
|
+
4. Check for existing [issues](https://github.com/brazunisdelamancha/milagre/issues) first, before filing an issue.
|
98
|
+
5. Have fun!
|
99
|
+
|
100
|
+
### Created & Maintained By
|
101
|
+
[Ricardo Brazรฃo](https://github.com/RicardoBrazao) ([@RicBrazao](https://www.twitter.com/RicBrazao))
|
data/lib/systematize/version.rb
CHANGED
data/lib/tasks/migrations.rake
CHANGED
@@ -24,4 +24,14 @@ namespace :systematize do
|
|
24
24
|
ActiveRecord::Migrator.migrate(temp_folder, 0)
|
25
25
|
end
|
26
26
|
end
|
27
|
+
|
28
|
+
desc "Create the database"
|
29
|
+
task :create => :environment do
|
30
|
+
Rake::Task["db:create"].invoke
|
31
|
+
end
|
32
|
+
|
33
|
+
desc "Drop the database"
|
34
|
+
task :drop => :environment do
|
35
|
+
Rake::Task["db:drop"].invoke
|
36
|
+
end
|
27
37
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,9 +1,24 @@
|
|
1
1
|
require 'rspec'
|
2
2
|
require 'rails'
|
3
|
+
require 'active_record'
|
3
4
|
require 'systematize'
|
4
5
|
require 'pry'
|
5
6
|
|
7
|
+
DATABASE_SPEC_FILE = 'spec/support/db/test.sqlite3'
|
8
|
+
|
6
9
|
RSpec.configure do |config|
|
7
10
|
config.color = true
|
8
11
|
config.tty = true
|
12
|
+
|
13
|
+
config.before(:suite) {
|
14
|
+
ActiveRecord::Base.establish_connection(
|
15
|
+
adapter: 'sqlite3',
|
16
|
+
database: DATABASE_SPEC_FILE,
|
17
|
+
)
|
18
|
+
}
|
19
|
+
|
20
|
+
config.after(:suite) {
|
21
|
+
FileUtils.rm(DATABASE_SPEC_FILE)
|
22
|
+
ActiveRecord::Base.connection.close
|
23
|
+
}
|
9
24
|
end
|
data/spec/testapp/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../../../systematize
|
3
3
|
specs:
|
4
|
-
systematize (0.0.
|
5
|
-
activerecord
|
6
|
-
railties
|
4
|
+
systematize (0.0.2)
|
5
|
+
activerecord (>= 3.2)
|
6
|
+
railties (>= 3.2)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
@@ -45,6 +45,7 @@ GEM
|
|
45
45
|
coffee-script-source
|
46
46
|
execjs
|
47
47
|
coffee-script-source (1.10.0)
|
48
|
+
diff-lcs (1.3)
|
48
49
|
erubis (2.7.0)
|
49
50
|
execjs (2.7.0)
|
50
51
|
hike (1.2.3)
|
@@ -91,6 +92,19 @@ GEM
|
|
91
92
|
rake (11.3.0)
|
92
93
|
rdoc (3.12.2)
|
93
94
|
json (~> 1.4)
|
95
|
+
rspec (3.5.0)
|
96
|
+
rspec-core (~> 3.5.0)
|
97
|
+
rspec-expectations (~> 3.5.0)
|
98
|
+
rspec-mocks (~> 3.5.0)
|
99
|
+
rspec-core (3.5.4)
|
100
|
+
rspec-support (~> 3.5.0)
|
101
|
+
rspec-expectations (3.5.0)
|
102
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
103
|
+
rspec-support (~> 3.5.0)
|
104
|
+
rspec-mocks (3.5.0)
|
105
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
106
|
+
rspec-support (~> 3.5.0)
|
107
|
+
rspec-support (3.5.0)
|
94
108
|
sass (3.4.22)
|
95
109
|
sass-rails (3.2.6)
|
96
110
|
railties (~> 3.2.0)
|
@@ -119,6 +133,7 @@ DEPENDENCIES
|
|
119
133
|
jquery-rails
|
120
134
|
pry
|
121
135
|
rails (= 3.2.0)
|
136
|
+
rspec
|
122
137
|
sass-rails (~> 3.2.3)
|
123
138
|
sqlite3
|
124
139
|
systematize!
|
Binary file
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended to check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(:version => 20161117152655) do
|
15
|
+
|
16
|
+
create_table "posts", :force => true do |t|
|
17
|
+
t.string "title"
|
18
|
+
t.string "description"
|
19
|
+
t.integer "owner_id"
|
20
|
+
t.datetime "created_at", :null => false
|
21
|
+
t.datetime "updated_at", :null => false
|
22
|
+
t.time "deleted_at"
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
@@ -951,3 +951,85 @@ Migrating to AddDeletedAtTimestamp (20161117152138)
|
|
951
951
|
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
952
952
|
[1m[35m (0.0ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
953
953
|
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
954
|
+
[1m[36m (0.3ms)[0m [1mselect sqlite_version(*)[0m
|
955
|
+
[1m[35m (0.7ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
956
|
+
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
957
|
+
[1m[35m (0.6ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
958
|
+
[1m[36m (0.0ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
959
|
+
Migrating to CreatePostsTable (20161117151622)
|
960
|
+
[1m[35m (0.0ms)[0m begin transaction
|
961
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "description" varchar(255), "owner_id" integer, "deleted" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
962
|
+
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20161117151622')
|
963
|
+
[1m[36m (0.7ms)[0m [1mcommit transaction[0m
|
964
|
+
Migrating to AddDeletedAtTimestamp (20161117152138)
|
965
|
+
[1m[35m (0.0ms)[0m begin transaction
|
966
|
+
[1m[36m (0.3ms)[0m [1mALTER TABLE "posts" ADD "deleted_at" time[0m
|
967
|
+
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20161117152138')
|
968
|
+
[1m[36m (0.6ms)[0m [1mcommit transaction[0m
|
969
|
+
Migrating to RemoveDeletedColumn (20161117152655)
|
970
|
+
[1m[35m (0.0ms)[0m begin transaction
|
971
|
+
[1m[36m (0.3ms)[0m [1mCREATE TEMPORARY TABLE "altered_posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "description" varchar(255), "owner_id" integer, "deleted" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "deleted_at" time) [0m
|
972
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("posts")
|
973
|
+
[1m[36m (0.0ms)[0m [1mSELECT * FROM "posts"[0m
|
974
|
+
[1m[35m (0.2ms)[0m DROP TABLE "posts"
|
975
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "description" varchar(255), "owner_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "deleted_at" time) [0m
|
976
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("altered_posts")
|
977
|
+
[1m[36m (0.1ms)[0m [1mSELECT * FROM "altered_posts"[0m
|
978
|
+
[1m[35m (0.2ms)[0m DROP TABLE "altered_posts"
|
979
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20161117152655')[0m
|
980
|
+
[1m[35m (0.8ms)[0m commit transaction
|
981
|
+
[1m[36m (0.2ms)[0m [1mselect sqlite_version(*)[0m
|
982
|
+
[1m[35m (0.0ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
983
|
+
[1m[36m (0.0ms)[0m [1mPRAGMA index_list("posts")[0m
|
984
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
985
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
986
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
987
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
988
|
+
[1m[36m (0.8ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
989
|
+
[1m[35m (0.0ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
990
|
+
Migrating to CreatePostsTable (20161117151622)
|
991
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "description" varchar(255), "owner_id" integer, "deleted" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
992
|
+
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20161117151622')
|
993
|
+
Migrating to AddDeletedAtTimestamp (20161117152138)
|
994
|
+
[1m[36m (0.2ms)[0m [1mALTER TABLE "posts" ADD "deleted_at" time[0m
|
995
|
+
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20161117152138')
|
996
|
+
Migrating to MarkDeletedPostsWithTimestamp (20161117152453)
|
997
|
+
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."deleted" = 't'[0m
|
998
|
+
[1m[35m (0.0ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20161117152453')
|
999
|
+
Migrating to RemoveDeletedColumn (20161117152655)
|
1000
|
+
[1m[36m (0.4ms)[0m [1mCREATE TEMPORARY TABLE "altered_posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "description" varchar(255), "owner_id" integer, "deleted" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "deleted_at" time) [0m
|
1001
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("posts")
|
1002
|
+
[1m[36m (0.0ms)[0m [1mSELECT * FROM "posts"[0m
|
1003
|
+
[1m[35m (0.1ms)[0m DROP TABLE "posts"
|
1004
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "description" varchar(255), "owner_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "deleted_at" time) [0m
|
1005
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("altered_posts")
|
1006
|
+
[1m[36m (0.0ms)[0m [1mSELECT * FROM "altered_posts"[0m
|
1007
|
+
[1m[35m (0.2ms)[0m DROP TABLE "altered_posts"
|
1008
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20161117152655')[0m
|
1009
|
+
[1m[35m (1.1ms)[0m commit transaction
|
1010
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
1011
|
+
[1m[35m (0.0ms)[0m select sqlite_version(*)
|
1012
|
+
[1m[36m (0.3ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) [0m
|
1013
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("schema_migrations")
|
1014
|
+
[1m[36m (0.2ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
1015
|
+
[1m[35m (0.0ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
1016
|
+
Migrating to CreatePostsTable (20161117151622)
|
1017
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "description" varchar(255), "owner_id" integer, "deleted" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
1018
|
+
[1m[35m (0.0ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20161117151622')
|
1019
|
+
Migrating to AddDeletedAtTimestamp (20161117152138)
|
1020
|
+
[1m[36m (0.2ms)[0m [1mALTER TABLE "posts" ADD "deleted_at" time[0m
|
1021
|
+
[1m[35m (0.0ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20161117152138')
|
1022
|
+
Migrating to MarkDeletedPostsWithTimestamp (20161117152453)
|
1023
|
+
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."deleted" = 't'[0m
|
1024
|
+
[1m[35m (0.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20161117152453')
|
1025
|
+
Migrating to RemoveDeletedColumn (20161117152655)
|
1026
|
+
[1m[36m (0.3ms)[0m [1mCREATE TEMPORARY TABLE "altered_posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "description" varchar(255), "owner_id" integer, "deleted" boolean, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "deleted_at" time) [0m
|
1027
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("posts")
|
1028
|
+
[1m[36m (0.0ms)[0m [1mSELECT * FROM "posts"[0m
|
1029
|
+
[1m[35m (0.1ms)[0m DROP TABLE "posts"
|
1030
|
+
[1m[36m (0.1ms)[0m [1mCREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "description" varchar(255), "owner_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL, "deleted_at" time) [0m
|
1031
|
+
[1m[35m (0.0ms)[0m PRAGMA index_list("altered_posts")
|
1032
|
+
[1m[36m (0.0ms)[0m [1mSELECT * FROM "altered_posts"[0m
|
1033
|
+
[1m[35m (0.3ms)[0m DROP TABLE "altered_posts"
|
1034
|
+
[1m[36m (0.0ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20161117152655')[0m
|
1035
|
+
[1m[35m (1.9ms)[0m commit transaction
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: systematize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ricardo Brazรฃo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: sqlite3
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
description: Systematize will order your data and struture migrations so you don't
|
70
84
|
have to think which one to run first.
|
71
85
|
email:
|
@@ -118,8 +132,8 @@ files:
|
|
118
132
|
- spec/testapp/db/migrate/20161117151622_create_posts_table.rb
|
119
133
|
- spec/testapp/db/migrate/20161117152138_add_deleted_at_timestamp.rb
|
120
134
|
- spec/testapp/db/migrate/20161117152655_remove_deleted_column.rb
|
135
|
+
- spec/testapp/db/schema.rb
|
121
136
|
- spec/testapp/db/seeds.rb
|
122
|
-
- spec/testapp/db/test.sqlite3
|
123
137
|
- spec/testapp/doc/README_FOR_APP
|
124
138
|
- spec/testapp/log/development.log
|
125
139
|
- spec/testapp/public/404.html
|
@@ -190,8 +204,8 @@ test_files:
|
|
190
204
|
- spec/testapp/db/migrate/20161117151622_create_posts_table.rb
|
191
205
|
- spec/testapp/db/migrate/20161117152138_add_deleted_at_timestamp.rb
|
192
206
|
- spec/testapp/db/migrate/20161117152655_remove_deleted_column.rb
|
207
|
+
- spec/testapp/db/schema.rb
|
193
208
|
- spec/testapp/db/seeds.rb
|
194
|
-
- spec/testapp/db/test.sqlite3
|
195
209
|
- spec/testapp/doc/README_FOR_APP
|
196
210
|
- spec/testapp/Gemfile
|
197
211
|
- spec/testapp/Gemfile.lock
|
File without changes
|