From c8d0f9936a3b356cb2b59c11f19d6bc2e7d66d0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81s=20Villagra=CC=81n?= Date: Fri, 1 Feb 2013 18:25:56 -0300 Subject: [PATCH 01/22] Foreign Key Support --- Gemfile | 2 +- README.rdoc | 11 +++++++++++ dm-migrations.gemspec | 2 +- lib/dm-migrations/sql/table_modifier.rb | 14 ++++++++++++++ lib/dm-migrations/version.rb | 2 +- 5 files changed, 28 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index c5d75ca..1ef0c5f 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ gemspec SOURCE = ENV.fetch('SOURCE', :git).to_sym REPO_POSTFIX = SOURCE == :path ? '' : '.git' DATAMAPPER = SOURCE == :path ? Pathname(__FILE__).dirname.parent : 'http://github.com/datamapper' -DM_VERSION = '~> 1.3.0.beta' +DM_VERSION = '~> 1.2.0' DO_VERSION = '~> 0.10.6' DM_DO_ADAPTERS = %w[ sqlite postgres mysql oracle sqlserver ] CURRENT_BRANCH = ENV.fetch('GIT_BRANCH', 'master') diff --git a/README.rdoc b/README.rdoc index d2ee9d7..34c4991 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,6 +1,7 @@ = dm-migrations DataMapper plugin for writing and specing migrations. +*New! Foreign Keys support!!* == Example @@ -13,14 +14,24 @@ DataMapper plugin for writing and specing migrations. migration 1, :create_people_table do up do + create_table :jobs do + column :id, Integer, :serial => true + column :name, String + end create_table :people do column :id, Integer, :serial => true column :desc, String + column :job_id + end + + modify_table :people do + add_foreign_key :job_id, :jobs end end down do drop_table :people + drop_table :jobs end end diff --git a/dm-migrations.gemspec b/dm-migrations.gemspec index 725ee44..dfba6b6 100644 --- a/dm-migrations.gemspec +++ b/dm-migrations.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |gem| gem.require_paths = [ "lib" ] gem.version = DataMapper::Migrations::VERSION - gem.add_runtime_dependency('dm-core', '~> 1.3.0.beta') + gem.add_runtime_dependency('dm-core', '~> 1.2.0') gem.add_development_dependency('rake', '~> 0.9.2') gem.add_development_dependency('rspec', '~> 1.3.2') diff --git a/lib/dm-migrations/sql/table_modifier.rb b/lib/dm-migrations/sql/table_modifier.rb index 51598a0..188f78d 100644 --- a/lib/dm-migrations/sql/table_modifier.rb +++ b/lib/dm-migrations/sql/table_modifier.rb @@ -19,6 +19,20 @@ def add_column(name, type, opts = {}) @statements << "ALTER TABLE #{quoted_table_name} ADD COLUMN #{column.to_sql}" end + def add_foreign_key(column, reference, reference_id = 'id') + @statements << "ALTER TABLE #{quoted_table_name} " + + "ADD CONSTRAINT #{quote_column_name(@table_name+'_'+reference.to_s.gsub('_id', '')+'_fk')} " + + "FOREIGN KEY (#{quote_column_name(column)}) " + + "REFERENCES #{quote_column_name(reference)} (#{quote_column_name(reference_id)}) " + + "ON DELETE NO ACTION ON UPDATE NO ACTION" + end + + def drop_foreign_key(constraint_name) + fk_name = quote_column_name(@table_name+'_'+constraint_name.to_s.gsub('_id', '')+'_fk') + @statements << "ALTER TABLE #{quoted_table_name} DROP FOREIGN KEY #{fk_name}" + @statements << "ALTER TABLE #{quoted_table_name} DROP INDEX #{fk_name}" + end + def drop_column(name) # raise NotImplemented for SQLite3. Can't ALTER TABLE, need to copy table. # We'd have to inspect it, and we can't, since we aren't executing any queries yet. diff --git a/lib/dm-migrations/version.rb b/lib/dm-migrations/version.rb index e725aea..2c59f98 100644 --- a/lib/dm-migrations/version.rb +++ b/lib/dm-migrations/version.rb @@ -1,5 +1,5 @@ module DataMapper module Migrations - VERSION = '1.3.0.beta' + VERSION = '1.3.1' end end From b0bcf9c2c4a22ee71f4db52838a660f573f63856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81s=20Villagra=CC=81n?= Date: Fri, 1 Feb 2013 18:26:44 -0300 Subject: [PATCH 02/22] Rdoc... --- README.rdoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.rdoc b/README.rdoc index 34c4991..1b781d2 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,7 +1,8 @@ = dm-migrations DataMapper plugin for writing and specing migrations. -*New! Foreign Keys support!!* + +New! Foreign Keys support!! == Example From 2f9400427039de8c28179fad41336bb4d40fd2fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Villagr=C3=A1n?= Date: Fri, 13 Mar 2015 17:18:45 -0300 Subject: [PATCH 03/22] Table and column check, for more cleaner migration --- lib/dm-migrations/migration.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/dm-migrations/migration.rb b/lib/dm-migrations/migration.rb index f1a7aa4..4762b77 100644 --- a/lib/dm-migrations/migration.rb +++ b/lib/dm-migrations/migration.rb @@ -247,6 +247,14 @@ def quoted_name def migration_info_table_exists? adapter.storage_exists?('migration_info') end + + def table_exists? name + adapter.storage_exists?(name) + end + + def table_column_exists? table, column + adapter.field_exists?(table, column) + end # Fetch the record for this migration out of the migration_info table def migration_record From 21d279d9f375aa0697505e4067fc5ae7ef708c9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Villagr=C3=A1n?= Date: Fri, 13 Mar 2015 17:28:30 -0300 Subject: [PATCH 04/22] Update migration.rb --- lib/dm-migrations/migration.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dm-migrations/migration.rb b/lib/dm-migrations/migration.rb index 4762b77..6174ccb 100644 --- a/lib/dm-migrations/migration.rb +++ b/lib/dm-migrations/migration.rb @@ -249,11 +249,11 @@ def migration_info_table_exists? end def table_exists? name - adapter.storage_exists?(name) + adapter.storage_exists?(name.to_s) end def table_column_exists? table, column - adapter.field_exists?(table, column) + adapter.field_exists?(table.to_s, column.to_s) end # Fetch the record for this migration out of the migration_info table From 0bf73cbfcf42e697b2d7e76190b9a061932ec8e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Villagr=C3=A1n?= Date: Fri, 13 Mar 2015 17:29:47 -0300 Subject: [PATCH 05/22] Update version.rb --- lib/dm-migrations/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dm-migrations/version.rb b/lib/dm-migrations/version.rb index 2c59f98..93d0d40 100644 --- a/lib/dm-migrations/version.rb +++ b/lib/dm-migrations/version.rb @@ -1,5 +1,5 @@ module DataMapper module Migrations - VERSION = '1.3.1' + VERSION = '1.3.2' end end From c1db3e7264fc0d7cfbed6abd7632e940e21169fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Villagr=C3=A1n?= Date: Fri, 13 Mar 2015 19:12:08 -0300 Subject: [PATCH 06/22] Update README.rdoc --- README.rdoc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.rdoc b/README.rdoc index 1b781d2..830c540 100644 --- a/README.rdoc +++ b/README.rdoc @@ -39,9 +39,7 @@ New! Foreign Keys support!! migration 2, :make_desc_text do up do modify_table :people do - # You currently have to use the underlying DB type here, rather than - # a DataMapper type - change_column :desc, 'text' + drop_foreign_key :job_id, :jobs end end end From 4a52f8df3635692c34c77787fe8c2295669c3f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Villagr=C3=A1n?= Date: Fri, 13 Mar 2015 19:13:22 -0300 Subject: [PATCH 07/22] Update README.rdoc --- README.rdoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.rdoc b/README.rdoc index 830c540..82c6c3f 100644 --- a/README.rdoc +++ b/README.rdoc @@ -39,6 +39,10 @@ New! Foreign Keys support!! migration 2, :make_desc_text do up do modify_table :people do + # You currently have to use the underlying DB type here, rather than + # a DataMapper type + change_column :desc, 'text' + drop_foreign_key :job_id, :jobs end end From 7797695b1c7d71d1a5618fc580d2145580eb948a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Villagr=C3=A1n?= Date: Fri, 13 Mar 2015 19:17:23 -0300 Subject: [PATCH 08/22] Update README.rdoc --- README.rdoc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/README.rdoc b/README.rdoc index 82c6c3f..22bdbb6 100644 --- a/README.rdoc +++ b/README.rdoc @@ -15,18 +15,22 @@ New! Foreign Keys support!! migration 1, :create_people_table do up do - create_table :jobs do - column :id, Integer, :serial => true - column :name, String + # Check if table exists + if table_exists? :positions + create_table :jobs do + column :id, Integer, :serial => true + column :name, String + end end create_table :people do column :id, Integer, :serial => true column :desc, String column :job_id end - - modify_table :people do - add_foreign_key :job_id, :jobs + if table_column_exists? :people, :jobs_id + modify_table :people do + add_foreign_key :job_id, :jobs + end end end From 7d60ae56b8e66ce209f7c6e425544cbdfbbe7941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Villagr=C3=A1n?= Date: Fri, 13 Mar 2015 19:21:06 -0300 Subject: [PATCH 09/22] Update README.rdoc --- README.rdoc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.rdoc b/README.rdoc index 22bdbb6..113161d 100644 --- a/README.rdoc +++ b/README.rdoc @@ -2,7 +2,12 @@ DataMapper plugin for writing and specing migrations. -New! Foreign Keys support!! +- Foreign Keys support +- table_exists? table +- table_column_exists? table, column + + + == Example From f84f776c14a979395cf5277db00ea58d106dda84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Villagr=C3=A1n?= Date: Fri, 13 Mar 2015 19:47:14 -0300 Subject: [PATCH 10/22] New functions - enable_foreign_key_checks - disable_foreign_key_checks - table_exists? name - table_column_exists? table, column --- lib/dm-migrations/migration.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/dm-migrations/migration.rb b/lib/dm-migrations/migration.rb index 6174ccb..aadfc0e 100644 --- a/lib/dm-migrations/migration.rb +++ b/lib/dm-migrations/migration.rb @@ -157,6 +157,14 @@ def select(sql, *bind_values) adapter.select(sql, *bind_values) end end + + def disable_foreign_key_checks + execute "SET foreign_key_checks = 0" + end + + def enable_foreign_key_checks + execute "SET foreign_key_checks = 1" + end def create_table(table_name, opts = {}, &block) execute TableCreator.new(adapter, table_name, opts, &block).to_sql From 385e860baa1ef09d7358bd5ba2df2eb12bde4d60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Villagr=C3=A1n?= Date: Fri, 13 Mar 2015 19:59:08 -0300 Subject: [PATCH 11/22] Examples and functions --- README.rdoc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.rdoc b/README.rdoc index 113161d..624bf41 100644 --- a/README.rdoc +++ b/README.rdoc @@ -5,6 +5,8 @@ DataMapper plugin for writing and specing migrations. - Foreign Keys support - table_exists? table - table_column_exists? table, column +- enable_foreign_key_checks +- disable_foreign_key_checks @@ -40,8 +42,10 @@ DataMapper plugin for writing and specing migrations. end down do + disable_foreign_key_checks drop_table :people drop_table :jobs + enable_foreign_key_checks end end From 3d773eb5b9dd1297fd3cfef7bba296881d742e1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Villagr=C3=A1n?= Date: Thu, 19 Mar 2015 12:48:49 -0300 Subject: [PATCH 12/22] Foreign key exists? table_name, foreign_key --- lib/dm-migrations/migration.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/dm-migrations/migration.rb b/lib/dm-migrations/migration.rb index aadfc0e..d0531b6 100644 --- a/lib/dm-migrations/migration.rb +++ b/lib/dm-migrations/migration.rb @@ -165,7 +165,11 @@ def disable_foreign_key_checks def enable_foreign_key_checks execute "SET foreign_key_checks = 1" end - + + def foreign_key_exists? table_name, foreign_key + execute "SELECT TRUE FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE CONSTRAINT_TYPE = 'FOREIGN KEY' AND TABLE_SCHEMA = '#{table_name}' AND CONSTRAINT_NAME = '#{foreign_key}'" + end + def create_table(table_name, opts = {}, &block) execute TableCreator.new(adapter, table_name, opts, &block).to_sql end From 4d99a819678fc40d5e628f255a4b29731886b1a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Villagr=C3=A1n?= Date: Thu, 19 Mar 2015 13:44:24 -0300 Subject: [PATCH 13/22] Update README.rdoc --- README.rdoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.rdoc b/README.rdoc index 624bf41..b811cc1 100644 --- a/README.rdoc +++ b/README.rdoc @@ -2,7 +2,8 @@ DataMapper plugin for writing and specing migrations. -- Foreign Keys support +- Foreign Keys support: +- foreign_key_exists? table_name, foreign_key - table_exists? table - table_column_exists? table, column - enable_foreign_key_checks From d11bff01e981ed876fddfa53aa4baec9cfea197e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Villagr=C3=A1n?= Date: Thu, 19 Mar 2015 13:48:12 -0300 Subject: [PATCH 14/22] Update migration.rb --- lib/dm-migrations/migration.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/dm-migrations/migration.rb b/lib/dm-migrations/migration.rb index d0531b6..d92c668 100644 --- a/lib/dm-migrations/migration.rb +++ b/lib/dm-migrations/migration.rb @@ -166,10 +166,6 @@ def enable_foreign_key_checks execute "SET foreign_key_checks = 1" end - def foreign_key_exists? table_name, foreign_key - execute "SELECT TRUE FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE CONSTRAINT_TYPE = 'FOREIGN KEY' AND TABLE_SCHEMA = '#{table_name}' AND CONSTRAINT_NAME = '#{foreign_key}'" - end - def create_table(table_name, opts = {}, &block) execute TableCreator.new(adapter, table_name, opts, &block).to_sql end From 7674dec51ad1a97c788e44990a6942bbb8669854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Villagr=C3=A1n?= Date: Thu, 19 Mar 2015 13:51:20 -0300 Subject: [PATCH 15/22] Update table_modifier.rb --- lib/dm-migrations/sql/table_modifier.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/dm-migrations/sql/table_modifier.rb b/lib/dm-migrations/sql/table_modifier.rb index 188f78d..5a2f5be 100644 --- a/lib/dm-migrations/sql/table_modifier.rb +++ b/lib/dm-migrations/sql/table_modifier.rb @@ -19,6 +19,10 @@ def add_column(name, type, opts = {}) @statements << "ALTER TABLE #{quoted_table_name} ADD COLUMN #{column.to_sql}" end + def foreign_key_exists?(column, reference, reference_id = 'id') + execute "SELECT TRUE FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE CONSTRAINT_TYPE = 'FOREIGN KEY' AND TABLE_SCHEMA = #{quoted_table_name} AND CONSTRAINT_NAME = '#{quote_column_name(@table_name+'_'+reference.to_s.gsub('_id', '')+'_fk')}'" + end + def add_foreign_key(column, reference, reference_id = 'id') @statements << "ALTER TABLE #{quoted_table_name} " + "ADD CONSTRAINT #{quote_column_name(@table_name+'_'+reference.to_s.gsub('_id', '')+'_fk')} " + From d46e5e853b74702b5101489743d29a4f03e92007 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Villagr=C3=A1n?= Date: Thu, 19 Mar 2015 13:54:02 -0300 Subject: [PATCH 16/22] Update table_modifier.rb --- lib/dm-migrations/sql/table_modifier.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dm-migrations/sql/table_modifier.rb b/lib/dm-migrations/sql/table_modifier.rb index 5a2f5be..0894941 100644 --- a/lib/dm-migrations/sql/table_modifier.rb +++ b/lib/dm-migrations/sql/table_modifier.rb @@ -19,8 +19,8 @@ def add_column(name, type, opts = {}) @statements << "ALTER TABLE #{quoted_table_name} ADD COLUMN #{column.to_sql}" end - def foreign_key_exists?(column, reference, reference_id = 'id') - execute "SELECT TRUE FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE CONSTRAINT_TYPE = 'FOREIGN KEY' AND TABLE_SCHEMA = #{quoted_table_name} AND CONSTRAINT_NAME = '#{quote_column_name(@table_name+'_'+reference.to_s.gsub('_id', '')+'_fk')}'" + def foreign_key_exists?(constraint_name) + execute "SELECT TRUE FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE CONSTRAINT_TYPE = 'FOREIGN KEY' AND TABLE_SCHEMA = #{quoted_table_name} AND CONSTRAINT_NAME = '#{quote_column_name(@table_name+'_'+constraint_name.to_s.gsub('_id', '')+'_fk')}'" end def add_foreign_key(column, reference, reference_id = 'id') From 42aca36e494a9be0e08530aae6835dc990eb0fcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Villagr=C3=A1n?= Date: Thu, 19 Mar 2015 18:31:45 -0300 Subject: [PATCH 17/22] Foreign key exists --- lib/dm-migrations/sql/table_modifier.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/dm-migrations/sql/table_modifier.rb b/lib/dm-migrations/sql/table_modifier.rb index 0894941..5a3950a 100644 --- a/lib/dm-migrations/sql/table_modifier.rb +++ b/lib/dm-migrations/sql/table_modifier.rb @@ -20,7 +20,12 @@ def add_column(name, type, opts = {}) end def foreign_key_exists?(constraint_name) - execute "SELECT TRUE FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE CONSTRAINT_TYPE = 'FOREIGN KEY' AND TABLE_SCHEMA = #{quoted_table_name} AND CONSTRAINT_NAME = '#{quote_column_name(@table_name+'_'+constraint_name.to_s.gsub('_id', '')+'_fk')}'" + # TODO: Move to ADAPTERS + str = "SELECT TRUE FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE CONSTRAINT_TYPE = 'FOREIGN KEY' AND TABLE_SCHEMA = '#{adapter.schema_name}' AND TABLE_NAME = '#{table_name}' AND CONSTRAINT_NAME = '#{@table_name+'_'+constraint_name.to_s.gsub('_id', '')+'_fk'}'" + # puts str + result = @adapter.select(str) + # puts "Result: #{result.inspect}" + result.blank? ? false : (result.first == 1) end def add_foreign_key(column, reference, reference_id = 'id') @@ -34,7 +39,7 @@ def add_foreign_key(column, reference, reference_id = 'id') def drop_foreign_key(constraint_name) fk_name = quote_column_name(@table_name+'_'+constraint_name.to_s.gsub('_id', '')+'_fk') @statements << "ALTER TABLE #{quoted_table_name} DROP FOREIGN KEY #{fk_name}" - @statements << "ALTER TABLE #{quoted_table_name} DROP INDEX #{fk_name}" + # @statements << "ALTER TABLE #{quoted_table_name} DROP INDEX #{fk_name}" end def drop_column(name) From b8e75b6f1cb6c7d343edd5e7df4ea5b37ad25078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Villagr=C3=A1n?= Date: Tue, 2 Jun 2015 00:42:27 -0300 Subject: [PATCH 18/22] Update version.rb --- lib/dm-migrations/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dm-migrations/version.rb b/lib/dm-migrations/version.rb index 93d0d40..a193e2a 100644 --- a/lib/dm-migrations/version.rb +++ b/lib/dm-migrations/version.rb @@ -1,5 +1,5 @@ module DataMapper module Migrations - VERSION = '1.3.2' + VERSION = '1.3.3' end end From 4e3fa4441943773bab32410e1efe64c4d4eb8d60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Villagr=C3=A1n?= Date: Mon, 21 Mar 2016 02:58:50 -0300 Subject: [PATCH 19/22] Updating dm-core to 1.3.0.beta --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 1ef0c5f..c5d75ca 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ gemspec SOURCE = ENV.fetch('SOURCE', :git).to_sym REPO_POSTFIX = SOURCE == :path ? '' : '.git' DATAMAPPER = SOURCE == :path ? Pathname(__FILE__).dirname.parent : 'http://github.com/datamapper' -DM_VERSION = '~> 1.2.0' +DM_VERSION = '~> 1.3.0.beta' DO_VERSION = '~> 0.10.6' DM_DO_ADAPTERS = %w[ sqlite postgres mysql oracle sqlserver ] CURRENT_BRANCH = ENV.fetch('GIT_BRANCH', 'master') From 924a35a49fdbde6ae1ddd3644a1d5770374e5ffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Villagr=C3=A1n?= Date: Mon, 21 Mar 2016 03:01:06 -0300 Subject: [PATCH 20/22] Update dm-migrations.gemspec --- dm-migrations.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dm-migrations.gemspec b/dm-migrations.gemspec index dfba6b6..725ee44 100644 --- a/dm-migrations.gemspec +++ b/dm-migrations.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |gem| gem.require_paths = [ "lib" ] gem.version = DataMapper::Migrations::VERSION - gem.add_runtime_dependency('dm-core', '~> 1.2.0') + gem.add_runtime_dependency('dm-core', '~> 1.3.0.beta') gem.add_development_dependency('rake', '~> 0.9.2') gem.add_development_dependency('rspec', '~> 1.3.2') From 2364a3899703dfd556f2b50a96bbbb77515f06a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Villagr=C3=A1n?= Date: Wed, 23 Mar 2016 19:25:54 -0300 Subject: [PATCH 21/22] Update Gemfile --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index c5d75ca..f3df1c8 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ gemspec SOURCE = ENV.fetch('SOURCE', :git).to_sym REPO_POSTFIX = SOURCE == :path ? '' : '.git' DATAMAPPER = SOURCE == :path ? Pathname(__FILE__).dirname.parent : 'http://github.com/datamapper' -DM_VERSION = '~> 1.3.0.beta' +DM_VERSION = '>= 1.2.0' DO_VERSION = '~> 0.10.6' DM_DO_ADAPTERS = %w[ sqlite postgres mysql oracle sqlserver ] CURRENT_BRANCH = ENV.fetch('GIT_BRANCH', 'master') From c77f763c2546aa2c4b2f6ebd9fb784b3718b6113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Villagr=C3=A1n?= Date: Wed, 23 Mar 2016 19:26:13 -0300 Subject: [PATCH 22/22] Update dm-migrations.gemspec --- dm-migrations.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dm-migrations.gemspec b/dm-migrations.gemspec index 725ee44..581b8f9 100644 --- a/dm-migrations.gemspec +++ b/dm-migrations.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |gem| gem.require_paths = [ "lib" ] gem.version = DataMapper::Migrations::VERSION - gem.add_runtime_dependency('dm-core', '~> 1.3.0.beta') + gem.add_runtime_dependency('dm-core', '>= 1.2.0') gem.add_development_dependency('rake', '~> 0.9.2') gem.add_development_dependency('rspec', '~> 1.3.2')