blue-shift 0.0.6 → 0.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 19697e1d921df9d562455830560b22cd26b60ca5
4
- data.tar.gz: 09c7d7afd5636a1f31a53bbef71286d440781570
3
+ metadata.gz: a7226ffcb5e676cc4e890469a49e6aefd03edd77
4
+ data.tar.gz: 910a9f2b04490588311784ad4968691398b2a180
5
5
  SHA512:
6
- metadata.gz: 42fe1da2f23eaf7fcd23633d799524e91d0e4b3e1ca15e126dd3f334262729bf7faa7c1a156a8042832d2a4b0ab7b3b1a15266dfcfa13cf52251eab7ce502055
7
- data.tar.gz: b8709eb657c350cb54f7a02816e3facb4cc1f60603eec03786b5af4f4ee4add1c7c2318aacbc165724a0dc165852c546cab9037479f92e2d9c98592a80c95be2
6
+ metadata.gz: 9795cfbdcb5e59026805ff7b17f88d34481993a02e2f8d0c788934ff2354498fab9f7524ce904a63c0132ba510f3634241c66f7c72f5aec717b4094195f11c3e
7
+ data.tar.gz: bfb91bb6b3773a7a8ef8a78fa80cf40f65a1a9915de2813c3e21ba93a2e4819bb42d749449e95a6549c50600b246b950a6201d882b1015c19b4221ea68785d0e
@@ -1,3 +1,3 @@
1
1
  module Blueshift
2
- VERSION = '0.0.6'
2
+ VERSION = '0.1.0'
3
3
  end
@@ -7,7 +7,6 @@ module Sequel
7
7
  def type_literal_generic_suuid(column)
8
8
  column[:fixed] = true
9
9
  column[:size] = 36
10
- column[:primary_key] = true
11
10
  column[:null] = false
12
11
  type_literal_generic_string(column)
13
12
  end
@@ -6,9 +6,6 @@ require 'blueshift'
6
6
  path = File.join(Dir.pwd, 'db')
7
7
  logger = Logger.new(STDOUT)
8
8
 
9
- Blueshift::POSTGRES_DB.logger = logger
10
- Blueshift::REDSHIFT_DB.logger = logger
11
-
12
9
  task :ensure_db_dir do
13
10
  FileUtils.mkdir_p(path)
14
11
  end
@@ -17,7 +14,7 @@ namespace :pg do
17
14
  namespace :schema do
18
15
  desc 'Dumps the Postgres schema to a file'
19
16
  task :dump => :ensure_db_dir do
20
- Blueshift::POSTGRES_DB.extension :redshift_schema_dumper
17
+ Blueshift::POSTGRES_DB.extension :schema_dumper
21
18
  File.open(File.join(path, 'schema.rb'), 'w') { |f| f << Blueshift::POSTGRES_DB.dump_schema_migration(same_db: true) }
22
19
  end
23
20
 
@@ -30,6 +27,7 @@ namespace :pg do
30
27
 
31
28
  desc 'Runs migrations for Postgres'
32
29
  task :migrate do
30
+ Blueshift::POSTGRES_DB.logger = logger
33
31
  Blueshift::Migration.run_pg!
34
32
  end
35
33
  end
@@ -40,7 +38,7 @@ namespace :redshift do
40
38
  desc 'Dumps the Postgres schema to a file'
41
39
  task :dump => :ensure_db_dir do
42
40
  Blueshift::REDSHIFT_DB.extension :redshift_schema_dumper
43
- File.open(File.join(path, 'schema_redshift.rb'), 'w') { |f| f << Blueshift::REDSHIFT_DB.dump_schema_migration(same_db: true) }
41
+ File.open(File.join(path, 'schema_redshift.rb'), 'w') { |f| f << Blueshift::REDSHIFT_DB.dump_schema_migration(same_db: false) }
44
42
  end
45
43
 
46
44
  desc 'Loads the Postgres schema from the file to the database'
@@ -52,6 +50,7 @@ namespace :redshift do
52
50
 
53
51
  desc 'Runs migrations for Redshift'
54
52
  task :migrate do
53
+ Blueshift::REDSHIFT_DB.logger = logger
55
54
  Blueshift::Migration.run_redshift!
56
55
  end
57
56
  end
@@ -60,6 +59,8 @@ namespace :blueshift do
60
59
  desc 'Runs migrations for both Postgres and Redshift'
61
60
  task :migrate do
62
61
  puts 'Running migrations for Postgres and Redshift...', ''
62
+ Blueshift::POSTGRES_DB.logger = logger
63
+ Blueshift::REDSHIFT_DB.logger = logger
63
64
  Blueshift::Migration.run_both!
64
65
  end
65
66
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blue-shift
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Mansour