prick 0.43.0 → 0.44.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 776071ac8d6762ee4a9d60f40c308a13be0fc51451ad52844e5821b3ec72d330
4
- data.tar.gz: c2d0d5637d8948853574edb40a932ec632f4dd6c53ce19b8fd18c64b6e639ab0
3
+ metadata.gz: e046355817f1eaf7637ad6738524e25988e26bb29cfbd5e78078cb2d30e71dc3
4
+ data.tar.gz: 1d0afc75efbafd486f3242b6adaa3d61ff245482facb936de29032ac87d053b5
5
5
  SHA512:
6
- metadata.gz: cbfb74c1775869db3ec1b2d24a8d69565d9b785220c9ec9c4051bb6f63de23709c71df4c4109d5de889352e66710fedcb1ca2ba667dfdd79f31f66396de35188
7
- data.tar.gz: 6a9e7b64410e37e7449e5c09ef41cdac244d3050418ea04b2ca6aa5316d716d415caba1be6a4ab280875eb345eddd99f9e7e4f527a7ebfc1673b439cf457a3a5
6
+ metadata.gz: e2431481ad1746d8657b3d569e7ce75f3b00d2109639d06aa8ce3a572e5d5994b69a5325214530ec8f8ba5559baef16b5731a91ae16528ba8fa4745ced92d092
7
+ data.tar.gz: c69e5435b07a36a766213a22b158655310479edaa5f7e934bb019e5d0d91c62458f2f8d7c03557747057fd1f892a972a990a26267e489722d60a33d3767e05c7
data/exe/prick CHANGED
@@ -166,7 +166,8 @@ SPEC = %(
166
166
  The --reset option resets data to the last snapshot before loading the
167
167
  file. The --exclude option lists schemas that should not be included in
168
168
  fox, typically schemas that doens't comply with prick's naming
169
- conventions
169
+ conventions. Schemas that are marked 'standard: false' in build.yml are
170
+ always excluded
170
171
 
171
172
  snapshot!
172
173
  Records maximum ID for all tables and stores them in the prick.snapshot
@@ -12,3 +12,4 @@
12
12
  refresh: false # Because the build process takes care of this
13
13
  - tables.sql
14
14
  - views.sql
15
+ - functions.sql
@@ -34,9 +34,14 @@ module Prick::SubCommand
34
34
 
35
35
  if exist # Empty (part of) the database
36
36
  if force
37
+ # Drop all schemas and re-create the public schema. The prick
38
+ # schema is only dropped if :force is true
39
+ # builder.pool.delete_schema("prick") if super_conn.schema.exist?("prick") && !force
40
+ # super_conn.rdbms.empty!(database, public: false, exclude: (force ? [] : ["prick"]))
41
+
37
42
  # Drop all schemas except the prick schema and re-creates the
38
43
  # public schema
39
- build.pool.delete_schema("prick") if super_conn.schema.exist?("prick")
44
+ builder.pool.delete_schema("prick") if super_conn.schema.exist?("prick")
40
45
  super_conn.rdbms.empty!(database, public: false, exclude: ["prick"])
41
46
  else
42
47
  # Find all schemas
@@ -3,8 +3,11 @@
3
3
  require_relative '../builder/builder.rb'
4
4
 
5
5
  module Prick::SubCommand
6
- def self.fox(database, username, files, reset: false, exclude: nil)
7
- self.drop_data(database) # In prick-drop
6
+ def self.fox(database, username, files, builddir: Prick.state.schema_dir, reset: false, exclude: nil)
7
+ self.drop_data(database) if reset # In prick-drop
8
+ conn = Prick.state.connection
9
+ builder = Prick::Build::Builder.new(conn, builddir)
10
+ exclude = (exclude || []) + builder.pg_graph_ignore_schemas
8
11
  opts = {
9
12
  state: FOX_STATE_PATH,
10
13
  delete: "none",
data/lib/prick/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Prick
4
- VERSION = "0.43.0"
4
+ VERSION = "0.44.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.43.0
4
+ version: 0.44.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-30 00:00:00.000000000 Z
11
+ date: 2024-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: semantic