caddie 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0a900bac7034bb9bb55a04958828c13fd101cac4
4
- data.tar.gz: e48bd88a06693f128d63d2f4fd28b7493d9a4b3c
3
+ metadata.gz: 3bdc2a5e9c25ef5e2dcd4c493cfc3dcbb1d8e7ba
4
+ data.tar.gz: 4f3e2dfe992c6372efd9ac22748dbf6c8d8ab1ee
5
5
  SHA512:
6
- metadata.gz: 2e28b839fdfaab5e58fe377a59b2d0d1a9074b1a049272197b8647d9a568453153fe8cb7efec9da3f18edc43f9c9efeea09d78dc2980b16daa1deecdd15a1ac9
7
- data.tar.gz: a95b096686c5206da4f6aab2369af6772b169b49af92d05ad49853b33bd5cec92d252408fd13c30f0b4d86b88cd81350a200a36fcce9a026726d6deb51abbbb2
6
+ metadata.gz: 79bf09bff7a35246301f19eb7ad4ea4cafc0d09802956bae39848584db6d2e88649bb58917899ee164521700fe32dca847ccb4a3a82e4275d26839adb992a30f
7
+ data.tar.gz: 7c3130658d924ea1b7fa68d168ee5634bea345b341c0bed9bfc7ddd7e448cb91d076ac25360fc025cec8b8ce6651f4ecb040f52c222b6ae0ce0d1b5248e994d6
@@ -48,7 +48,7 @@ module Caddie
48
48
  private
49
49
 
50
50
  def self.daily_operations_list
51
- self.where( next_process_date: Time.now.to_date ).order( :process_queue_priority ).limit( 100 )
51
+ self.where( next_process_date: Time.now.to_date ).order( :process_queue_priority )
52
52
  end
53
53
 
54
54
  end
@@ -1,3 +1,3 @@
1
1
  module Caddie
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20160524122651) do
14
+ ActiveRecord::Schema.define(version: 20160405090537) do
15
15
 
16
16
  # These are extensions that must be enabled in order to support this database
17
17
  enable_extension "plpgsql"
@@ -38,23 +38,6 @@ ActiveRecord::Schema.define(version: 20160524122651) do
38
38
  add_index "blueprints", ["cpp_blueprint_id"], name: "index_blueprints_on_cpp_blueprint_id", using: :btree
39
39
  add_index "blueprints", ["eve_item_id"], name: "index_blueprints_on_eve_item_id", using: :btree
40
40
 
41
- create_table "caddie_crest_price_history_updates", force: :cascade do |t|
42
- t.integer "eve_item_id"
43
- t.integer "region_id"
44
- t.date "max_update"
45
- t.date "max_eve_item_create"
46
- t.date "max_region_create"
47
- t.date "max_date"
48
- t.integer "nb_days"
49
- t.string "process_queue"
50
- t.integer "process_queue_priority"
51
- t.date "next_process_date"
52
- t.datetime "created_at", null: false
53
- t.datetime "updated_at", null: false
54
- end
55
-
56
- add_index "caddie_crest_price_history_updates", ["eve_item_id", "region_id"], name: "index_caddie_cphu_on_eve_item_id_and_region_id", unique: true, using: :btree
57
-
58
41
  create_table "components", force: :cascade do |t|
59
42
  t.integer "cpp_eve_item_id"
60
43
  t.string "name", limit: 255
@@ -353,8 +336,6 @@ ActiveRecord::Schema.define(version: 20160524122651) do
353
336
 
354
337
  add_foreign_key "api_key_errors", "users"
355
338
  add_foreign_key "blueprints", "eve_items"
356
- add_foreign_key "caddie_crest_price_history_updates", "eve_items"
357
- add_foreign_key "caddie_crest_price_history_updates", "regions"
358
339
  add_foreign_key "crest_costs", "eve_items"
359
340
  add_foreign_key "crest_price_histories", "eve_items"
360
341
  add_foreign_key "crest_price_histories", "regions"
@@ -50232,3 +50232,348 @@ WHERE nb_days > 30 OR nb_days IS NULL;
50232
50232
  CrestPriceHistory Load (0.3ms) SELECT "crest_price_histories".* FROM "crest_price_histories" WHERE "crest_price_histories"."region_id" = $1 AND "crest_price_histories"."eve_item_id" = $2 AND "crest_price_histories"."day_timestamp" = $3 ORDER BY "crest_price_histories"."id" ASC LIMIT 1 [["region_id", 11], ["eve_item_id", 3], ["day_timestamp", "20160524"]]
50233
50233
  SQL (0.4ms) INSERT INTO "crest_price_histories" ("region_id", "eve_item_id", "day_timestamp", "history_date", "order_count", "volume", "low_price", "avg_price", "high_price", "created_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id" [["region_id", 11], ["eve_item_id", 3], ["day_timestamp", "20160524"], ["history_date", "2016-05-24 00:00:00.000000"], ["order_count", 2], ["volume", 59], ["low_price", 262500.0], ["avg_price", 267305.08], ["high_price", 294000.0], ["created_at", "2016-05-25 15:49:39.083348"], ["updated_at", "2016-05-25 15:49:39.083348"]]
50234
50234
   (0.7ms) COMMIT
50235
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
50236
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
50237
+ Migrating to CreateCaddieCrestPriceHistoryUpdates (20160524122651)
50238
+  (0.2ms) BEGIN
50239
+  (8.7ms) DROP INDEX "index_caddie_cphu_on_eve_item_id_and_region_id"
50240
+  (9.2ms) DROP TABLE "caddie_crest_price_history_updates"
50241
+ SQL (0.4ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = $1 [["version", "20160524122651"]]
50242
+  (77.2ms) COMMIT
50243
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
50244
+  (3.3ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50245
+ FROM pg_constraint c
50246
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50247
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50248
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50249
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50250
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50251
+ WHERE c.contype = 'f'
50252
+ AND t1.relname = 'api_key_errors'
50253
+ AND t3.nspname = ANY (current_schemas(false))
50254
+ ORDER BY c.conname
50255
+ 
50256
+  (2.4ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50257
+ FROM pg_constraint c
50258
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50259
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50260
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50261
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50262
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50263
+ WHERE c.contype = 'f'
50264
+ AND t1.relname = 'blueprints'
50265
+ AND t3.nspname = ANY (current_schemas(false))
50266
+ ORDER BY c.conname
50267
+
50268
+  (1.7ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50269
+ FROM pg_constraint c
50270
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50271
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50272
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50273
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50274
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50275
+ WHERE c.contype = 'f'
50276
+ AND t1.relname = 'components'
50277
+ AND t3.nspname = ANY (current_schemas(false))
50278
+ ORDER BY c.conname
50279
+ 
50280
+  (1.7ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50281
+ FROM pg_constraint c
50282
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50283
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50284
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50285
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50286
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50287
+ WHERE c.contype = 'f'
50288
+ AND t1.relname = 'crest_costs'
50289
+ AND t3.nspname = ANY (current_schemas(false))
50290
+ ORDER BY c.conname
50291
+
50292
+  (1.7ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50293
+ FROM pg_constraint c
50294
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50295
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50296
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50297
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50298
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50299
+ WHERE c.contype = 'f'
50300
+ AND t1.relname = 'crest_price_histories'
50301
+ AND t3.nspname = ANY (current_schemas(false))
50302
+ ORDER BY c.conname
50303
+ 
50304
+  (1.7ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50305
+ FROM pg_constraint c
50306
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50307
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50308
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50309
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50310
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50311
+ WHERE c.contype = 'f'
50312
+ AND t1.relname = 'crest_price_histories_daily_used'
50313
+ AND t3.nspname = ANY (current_schemas(false))
50314
+ ORDER BY c.conname
50315
+
50316
+  (1.7ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50317
+ FROM pg_constraint c
50318
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50319
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50320
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50321
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50322
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50323
+ WHERE c.contype = 'f'
50324
+ AND t1.relname = 'crest_price_histories_frequently_used'
50325
+ AND t3.nspname = ANY (current_schemas(false))
50326
+ ORDER BY c.conname
50327
+ 
50328
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50329
+ FROM pg_constraint c
50330
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50331
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50332
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50333
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50334
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50335
+ WHERE c.contype = 'f'
50336
+ AND t1.relname = 'crest_price_histories_never_used'
50337
+ AND t3.nspname = ANY (current_schemas(false))
50338
+ ORDER BY c.conname
50339
+
50340
+  (1.7ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50341
+ FROM pg_constraint c
50342
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50343
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50344
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50345
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50346
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50347
+ WHERE c.contype = 'f'
50348
+ AND t1.relname = 'crest_price_histories_rarely_used'
50349
+ AND t3.nspname = ANY (current_schemas(false))
50350
+ ORDER BY c.conname
50351
+ 
50352
+  (1.7ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50353
+ FROM pg_constraint c
50354
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50355
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50356
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50357
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50358
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50359
+ WHERE c.contype = 'f'
50360
+ AND t1.relname = 'crest_prices_last_month_averages'
50361
+ AND t3.nspname = ANY (current_schemas(false))
50362
+ ORDER BY c.conname
50363
+
50364
+  (1.8ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50365
+ FROM pg_constraint c
50366
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50367
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50368
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50369
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50370
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50371
+ WHERE c.contype = 'f'
50372
+ AND t1.relname = 'eve_clients'
50373
+ AND t3.nspname = ANY (current_schemas(false))
50374
+ ORDER BY c.conname
50375
+ 
50376
+  (1.7ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50377
+ FROM pg_constraint c
50378
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50379
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50380
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50381
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50382
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50383
+ WHERE c.contype = 'f'
50384
+ AND t1.relname = 'eve_items'
50385
+ AND t3.nspname = ANY (current_schemas(false))
50386
+ ORDER BY c.conname
50387
+
50388
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50389
+ FROM pg_constraint c
50390
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50391
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50392
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50393
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50394
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50395
+ WHERE c.contype = 'f'
50396
+ AND t1.relname = 'eve_items_users'
50397
+ AND t3.nspname = ANY (current_schemas(false))
50398
+ ORDER BY c.conname
50399
+ 
50400
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50401
+ FROM pg_constraint c
50402
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50403
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50404
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50405
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50406
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50407
+ WHERE c.contype = 'f'
50408
+ AND t1.relname = 'identities'
50409
+ AND t3.nspname = ANY (current_schemas(false))
50410
+ ORDER BY c.conname
50411
+
50412
+  (1.5ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50413
+ FROM pg_constraint c
50414
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50415
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50416
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50417
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50418
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50419
+ WHERE c.contype = 'f'
50420
+ AND t1.relname = 'jita_margins'
50421
+ AND t3.nspname = ANY (current_schemas(false))
50422
+ ORDER BY c.conname
50423
+ 
50424
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50425
+ FROM pg_constraint c
50426
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50427
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50428
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50429
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50430
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50431
+ WHERE c.contype = 'f'
50432
+ AND t1.relname = 'market_group_hierarchies'
50433
+ AND t3.nspname = ANY (current_schemas(false))
50434
+ ORDER BY c.conname
50435
+
50436
+  (1.7ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50437
+ FROM pg_constraint c
50438
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50439
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50440
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50441
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50442
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50443
+ WHERE c.contype = 'f'
50444
+ AND t1.relname = 'market_groups'
50445
+ AND t3.nspname = ANY (current_schemas(false))
50446
+ ORDER BY c.conname
50447
+ 
50448
+  (1.7ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50449
+ FROM pg_constraint c
50450
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50451
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50452
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50453
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50454
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50455
+ WHERE c.contype = 'f'
50456
+ AND t1.relname = 'materials'
50457
+ AND t3.nspname = ANY (current_schemas(false))
50458
+ ORDER BY c.conname
50459
+
50460
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50461
+ FROM pg_constraint c
50462
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50463
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50464
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50465
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50466
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50467
+ WHERE c.contype = 'f'
50468
+ AND t1.relname = 'min_prices'
50469
+ AND t3.nspname = ANY (current_schemas(false))
50470
+ ORDER BY c.conname
50471
+ 
50472
+  (1.7ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50473
+ FROM pg_constraint c
50474
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50475
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50476
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50477
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50478
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50479
+ WHERE c.contype = 'f'
50480
+ AND t1.relname = 'regions'
50481
+ AND t3.nspname = ANY (current_schemas(false))
50482
+ ORDER BY c.conname
50483
+
50484
+  (1.7ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50485
+ FROM pg_constraint c
50486
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50487
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50488
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50489
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50490
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50491
+ WHERE c.contype = 'f'
50492
+ AND t1.relname = 'sale_records'
50493
+ AND t3.nspname = ANY (current_schemas(false))
50494
+ ORDER BY c.conname
50495
+ 
50496
+  (1.7ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50497
+ FROM pg_constraint c
50498
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50499
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50500
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50501
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50502
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50503
+ WHERE c.contype = 'f'
50504
+ AND t1.relname = 'shopping_baskets'
50505
+ AND t3.nspname = ANY (current_schemas(false))
50506
+ ORDER BY c.conname
50507
+
50508
+  (2.0ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50509
+ FROM pg_constraint c
50510
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50511
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50512
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50513
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50514
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50515
+ WHERE c.contype = 'f'
50516
+ AND t1.relname = 'stations'
50517
+ AND t3.nspname = ANY (current_schemas(false))
50518
+ ORDER BY c.conname
50519
+ 
50520
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50521
+ FROM pg_constraint c
50522
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50523
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50524
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50525
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50526
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50527
+ WHERE c.contype = 'f'
50528
+ AND t1.relname = 'trade_hubs'
50529
+ AND t3.nspname = ANY (current_schemas(false))
50530
+ ORDER BY c.conname
50531
+
50532
+  (1.5ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50533
+ FROM pg_constraint c
50534
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50535
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50536
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50537
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50538
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50539
+ WHERE c.contype = 'f'
50540
+ AND t1.relname = 'trade_hubs_users'
50541
+ AND t3.nspname = ANY (current_schemas(false))
50542
+ ORDER BY c.conname
50543
+ 
50544
+  (1.7ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50545
+ FROM pg_constraint c
50546
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50547
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50548
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50549
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50550
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50551
+ WHERE c.contype = 'f'
50552
+ AND t1.relname = 'trade_orders'
50553
+ AND t3.nspname = ANY (current_schemas(false))
50554
+ ORDER BY c.conname
50555
+
50556
+  (1.8ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50557
+ FROM pg_constraint c
50558
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50559
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50560
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50561
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50562
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50563
+ WHERE c.contype = 'f'
50564
+ AND t1.relname = 'user_activity_logs'
50565
+ AND t3.nspname = ANY (current_schemas(false))
50566
+ ORDER BY c.conname
50567
+ 
50568
+  (1.7ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
50569
+ FROM pg_constraint c
50570
+ JOIN pg_class t1 ON c.conrelid = t1.oid
50571
+ JOIN pg_class t2 ON c.confrelid = t2.oid
50572
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
50573
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
50574
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
50575
+ WHERE c.contype = 'f'
50576
+ AND t1.relname = 'users'
50577
+ AND t3.nspname = ANY (current_schemas(false))
50578
+ ORDER BY c.conname
50579
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caddie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zuger Cédric