tern 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/MIT-LICENSE +20 -0
- data/README.markdown +189 -0
- data/Rakefile +2 -0
- data/bin/tern +6 -0
- data/lib/tern.rb +207 -0
- data/lib/tern/app.rb +65 -0
- data/lib/tern/generators/change.sql +4 -0
- data/lib/tern/generators/new/alterations/.empty_directory +0 -0
- data/lib/tern/generators/new/alterations/001_create_people.sql.example +16 -0
- data/lib/tern/generators/new/config.yml.tt +15 -0
- data/lib/tern/generators/new/definitions/sequence.yml +18 -0
- data/lib/tern/generators/new/definitions/ultimate_answer.sql.example +7 -0
- data/spec/projects/alterations/alterations/001_create_people.sql +8 -0
- data/spec/projects/alterations/alterations/002_create_animals.sql +8 -0
- data/spec/projects/alterations/alterations/003_create_plants.sql +8 -0
- data/spec/projects/alterations/config.yml +15 -0
- data/spec/projects/alterations/definitions/sequence.yml +18 -0
- data/spec/projects/alterations/definitions/ultimate_answer.sql.example +7 -0
- data/spec/projects/definitions/alterations/001_create_people.sql.example +16 -0
- data/spec/projects/definitions/config.yml +15 -0
- data/spec/projects/definitions/definitions/sequence.yml +19 -0
- data/spec/projects/definitions/definitions/ultimate_answer.sql +7 -0
- data/spec/projects/dependencies_1/alterations/001_create_widgets.sql +9 -0
- data/spec/projects/dependencies_1/config.yml +15 -0
- data/spec/projects/dependencies_1/definitions/sequence.yml +19 -0
- data/spec/projects/dependencies_1/definitions/ultimate_answer.sql.example +7 -0
- data/spec/projects/dependencies_1/definitions/widgets_view.sql +5 -0
- data/spec/projects/dependencies_2/alterations/001_create_widgets.sql +9 -0
- data/spec/projects/dependencies_2/config.yml +15 -0
- data/spec/projects/dependencies_2/definitions/sequence.yml +18 -0
- data/spec/projects/dependencies_2/definitions/ultimate_answer.sql.example +7 -0
- data/spec/projects/duplicated_alteration/alterations/001_create_people.sql +8 -0
- data/spec/projects/duplicated_alteration/alterations/002_create_animals.sql +8 -0
- data/spec/projects/duplicated_alteration/alterations/002_create_plants.sql +8 -0
- data/spec/projects/duplicated_alteration/config.yml +15 -0
- data/spec/projects/duplicated_alteration/definitions/sequence.yml +18 -0
- data/spec/projects/duplicated_alteration/definitions/ultimate_answer.sql.example +7 -0
- data/spec/projects/irreversible_alterations/alterations/001_create_people.sql +8 -0
- data/spec/projects/irreversible_alterations/alterations/002_create_animals.sql +4 -0
- data/spec/projects/irreversible_alterations/alterations/003_create_plants.sql +8 -0
- data/spec/projects/irreversible_alterations/config.yml +15 -0
- data/spec/projects/irreversible_alterations/definitions/sequence.yml +18 -0
- data/spec/projects/irreversible_alterations/definitions/ultimate_answer.sql.example +7 -0
- data/spec/projects/missing_alteration/alterations/001_create_people.sql +8 -0
- data/spec/projects/missing_alteration/alterations/003_create_plants.sql +8 -0
- data/spec/projects/missing_alteration/config.yml +15 -0
- data/spec/projects/missing_alteration/definitions/sequence.yml +18 -0
- data/spec/projects/missing_alteration/definitions/ultimate_answer.sql.example +7 -0
- data/spec/projects/multiple_sequences/alterations/001_create_people.sql.example +16 -0
- data/spec/projects/multiple_sequences/config.yml +15 -0
- data/spec/projects/multiple_sequences/definitions/create_view_a.sql +5 -0
- data/spec/projects/multiple_sequences/definitions/create_view_b.sql +5 -0
- data/spec/projects/multiple_sequences/definitions/sequence.yml +21 -0
- data/spec/projects/multiple_sequences/definitions/ultimate_answer.sql.example +7 -0
- data/spec/projects/new/alterations/001_create_people.sql.example +16 -0
- data/spec/projects/new/config.yml +15 -0
- data/spec/projects/new/definitions/sequence.yml +18 -0
- data/spec/projects/new/definitions/ultimate_answer.sql.example +7 -0
- data/spec/projects/no_alterations/alterations/001_create_people.sql.example +16 -0
- data/spec/projects/no_alterations/config.yml +15 -0
- data/spec/projects/no_alterations/definitions/sequence.yml +18 -0
- data/spec/projects/no_alterations/definitions/ultimate_answer.sql.example +7 -0
- data/spec/tern_spec.rb +215 -0
- data/tern.gemspec +23 -0
- metadata +174 -0
File without changes
|
@@ -0,0 +1,15 @@
|
|
1
|
+
alterations:
|
2
|
+
table: tern_alterations
|
3
|
+
column: version
|
4
|
+
definitions:
|
5
|
+
table: tern_definitions
|
6
|
+
environments:
|
7
|
+
development:
|
8
|
+
adapter: postgres
|
9
|
+
database: <%= app_name %>_development
|
10
|
+
test:
|
11
|
+
adapter: postgres
|
12
|
+
database: <%= app_name %>_test
|
13
|
+
production:
|
14
|
+
adapter: postgres
|
15
|
+
database: <%= app_name %>_production
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Put the relative path to your definition files in the sequence they should run.
|
2
|
+
#
|
3
|
+
# Most definitions should go in the default list. These will be dropped and
|
4
|
+
# recreated every migration.
|
5
|
+
#
|
6
|
+
# Definitions that should not automatically be dropped and created can be put in
|
7
|
+
# different lists. This is useful for definitions that make take prohibitively
|
8
|
+
# to drop and create every migration such as check constraints.
|
9
|
+
#
|
10
|
+
# Run alternative sequences by specifying sequences in order to migrate command.
|
11
|
+
# Example: rake migrate sequences=expensive,default
|
12
|
+
#
|
13
|
+
# default:
|
14
|
+
# - ultimate_answer.sql
|
15
|
+
# expensive:
|
16
|
+
# - super_slow_check_constraint.sql
|
17
|
+
|
18
|
+
default: []
|
@@ -0,0 +1,15 @@
|
|
1
|
+
alterations:
|
2
|
+
table: tern_alterations
|
3
|
+
column: version
|
4
|
+
definitions:
|
5
|
+
table: tern_definitions
|
6
|
+
environments:
|
7
|
+
development:
|
8
|
+
adapter: postgres
|
9
|
+
database: tern_test_development
|
10
|
+
test:
|
11
|
+
adapter: postgres
|
12
|
+
database: tern_test_test
|
13
|
+
production:
|
14
|
+
adapter: postgres
|
15
|
+
database: tern_test_production
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Put the relative path to your definition files in the sequence they should run.
|
2
|
+
#
|
3
|
+
# Most definitions should go in the default list. These will be dropped and
|
4
|
+
# recreated every migration.
|
5
|
+
#
|
6
|
+
# Definitions that should not automatically be dropped and created can be put in
|
7
|
+
# different lists. This is useful for definitions that make take prohibitively
|
8
|
+
# to drop and create every migration such as check constraints.
|
9
|
+
#
|
10
|
+
# Run alternative sequences by specifying sequences in order to migrate command.
|
11
|
+
# Example: rake migrate sequences=expensive,default
|
12
|
+
#
|
13
|
+
# default:
|
14
|
+
# - ultimate_answer.sql
|
15
|
+
# expensive:
|
16
|
+
# - super_slow_check_constraint.sql
|
17
|
+
|
18
|
+
default: []
|
@@ -0,0 +1,15 @@
|
|
1
|
+
alterations:
|
2
|
+
table: tern_alterations
|
3
|
+
column: version
|
4
|
+
definitions:
|
5
|
+
table: tern_definitions
|
6
|
+
environments:
|
7
|
+
development:
|
8
|
+
adapter: postgres
|
9
|
+
database: tern_test_development
|
10
|
+
test:
|
11
|
+
adapter: postgres
|
12
|
+
database: tern_test_test
|
13
|
+
production:
|
14
|
+
adapter: postgres
|
15
|
+
database: tern_test_production
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Put the relative path to your definition files in the sequence they should run.
|
2
|
+
#
|
3
|
+
# Most definitions should go in the default list. These will be dropped and
|
4
|
+
# recreated every migration.
|
5
|
+
#
|
6
|
+
# Definitions that should not automatically be dropped and created can be put in
|
7
|
+
# different lists. This is useful for definitions that make take prohibitively
|
8
|
+
# to drop and create every migration such as check constraints.
|
9
|
+
#
|
10
|
+
# Run alternative sequences by specifying sequences in order to migrate command.
|
11
|
+
# Example: rake migrate sequences=expensive,default
|
12
|
+
#
|
13
|
+
# default:
|
14
|
+
# - ultimate_answer.sql
|
15
|
+
# expensive:
|
16
|
+
# - super_slow_check_constraint.sql
|
17
|
+
|
18
|
+
default:
|
19
|
+
- ultimate_answer.sql
|
@@ -0,0 +1,15 @@
|
|
1
|
+
alterations:
|
2
|
+
table: tern_alterations
|
3
|
+
column: version
|
4
|
+
definitions:
|
5
|
+
table: tern_definitions
|
6
|
+
environments:
|
7
|
+
development:
|
8
|
+
adapter: postgres
|
9
|
+
database: tern_test_development
|
10
|
+
test:
|
11
|
+
adapter: postgres
|
12
|
+
database: tern_test_test
|
13
|
+
production:
|
14
|
+
adapter: postgres
|
15
|
+
database: tern_test_production
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Put the relative path to your definition files in the sequence they should run.
|
2
|
+
#
|
3
|
+
# Most definitions should go in the default list. These will be dropped and
|
4
|
+
# recreated every migration.
|
5
|
+
#
|
6
|
+
# Definitions that should not automatically be dropped and created can be put in
|
7
|
+
# different lists. This is useful for definitions that make take prohibitively
|
8
|
+
# to drop and create every migration such as check constraints.
|
9
|
+
#
|
10
|
+
# Run alternative sequences by specifying sequences in order to migrate command.
|
11
|
+
# Example: rake migrate sequences=expensive,default
|
12
|
+
#
|
13
|
+
# default:
|
14
|
+
# - ultimate_answer.sql
|
15
|
+
# expensive:
|
16
|
+
# - super_slow_check_constraint.sql
|
17
|
+
|
18
|
+
default:
|
19
|
+
- widgets_view.sql
|
@@ -0,0 +1,15 @@
|
|
1
|
+
alterations:
|
2
|
+
table: tern_alterations
|
3
|
+
column: version
|
4
|
+
definitions:
|
5
|
+
table: tern_definitions
|
6
|
+
environments:
|
7
|
+
development:
|
8
|
+
adapter: postgres
|
9
|
+
database: tern_test_development
|
10
|
+
test:
|
11
|
+
adapter: postgres
|
12
|
+
database: tern_test_test
|
13
|
+
production:
|
14
|
+
adapter: postgres
|
15
|
+
database: tern_test_production
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Put the relative path to your definition files in the sequence they should run.
|
2
|
+
#
|
3
|
+
# Most definitions should go in the default list. These will be dropped and
|
4
|
+
# recreated every migration.
|
5
|
+
#
|
6
|
+
# Definitions that should not automatically be dropped and created can be put in
|
7
|
+
# different lists. This is useful for definitions that make take prohibitively
|
8
|
+
# to drop and create every migration such as check constraints.
|
9
|
+
#
|
10
|
+
# Run alternative sequences by specifying sequences in order to migrate command.
|
11
|
+
# Example: rake migrate sequences=expensive,default
|
12
|
+
#
|
13
|
+
# default:
|
14
|
+
# - ultimate_answer.sql
|
15
|
+
# expensive:
|
16
|
+
# - super_slow_check_constraint.sql
|
17
|
+
|
18
|
+
default: []
|
@@ -0,0 +1,15 @@
|
|
1
|
+
alterations:
|
2
|
+
table: tern_alterations
|
3
|
+
column: version
|
4
|
+
definitions:
|
5
|
+
table: tern_definitions
|
6
|
+
environments:
|
7
|
+
development:
|
8
|
+
adapter: postgres
|
9
|
+
database: tern_test_development
|
10
|
+
test:
|
11
|
+
adapter: postgres
|
12
|
+
database: tern_test_test
|
13
|
+
production:
|
14
|
+
adapter: postgres
|
15
|
+
database: tern_test_production
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Put the relative path to your definition files in the sequence they should run.
|
2
|
+
#
|
3
|
+
# Most definitions should go in the default list. These will be dropped and
|
4
|
+
# recreated every migration.
|
5
|
+
#
|
6
|
+
# Definitions that should not automatically be dropped and created can be put in
|
7
|
+
# different lists. This is useful for definitions that make take prohibitively
|
8
|
+
# to drop and create every migration such as check constraints.
|
9
|
+
#
|
10
|
+
# Run alternative sequences by specifying sequences in order to migrate command.
|
11
|
+
# Example: rake migrate sequences=expensive,default
|
12
|
+
#
|
13
|
+
# default:
|
14
|
+
# - ultimate_answer.sql
|
15
|
+
# expensive:
|
16
|
+
# - super_slow_check_constraint.sql
|
17
|
+
|
18
|
+
default: []
|
@@ -0,0 +1,15 @@
|
|
1
|
+
alterations:
|
2
|
+
table: tern_alterations
|
3
|
+
column: version
|
4
|
+
definitions:
|
5
|
+
table: tern_definitions
|
6
|
+
environments:
|
7
|
+
development:
|
8
|
+
adapter: postgres
|
9
|
+
database: tern_test_development
|
10
|
+
test:
|
11
|
+
adapter: postgres
|
12
|
+
database: tern_test_test
|
13
|
+
production:
|
14
|
+
adapter: postgres
|
15
|
+
database: tern_test_production
|