fine_print 1.0.0 → 1.1.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
  SHA1:
3
- metadata.gz: d381ead09489e5ca6b883c0ce22c68f7c9b9a623
4
- data.tar.gz: 05d8ababdd00605954298ffdb15c0f89dfe9268b
3
+ metadata.gz: 5872d7ae6a8abfb926c3eb5c3203e086937ee70c
4
+ data.tar.gz: c685f59d91186586a78bd74eafaf16e2c02c2b65
5
5
  SHA512:
6
- metadata.gz: 01d698b01cc332ba64c925ee1d1a1e9fd0502a398f95a9c654b5b00199e4f0e7eda1ea96623484779defda49541b341801e5d6d0c0dd9490adb0ba869b22512c
7
- data.tar.gz: 4aeb8f6fb1b4971033c9ab4c21676d22ffdf60651a4423e63e85286bc3dc606faced415717dd6f4aa8dfe448532f2000b72a59fb09d089ffbd6da16e3b3829f3
6
+ metadata.gz: 96ee62c1e276077980ff95575e896ada2e679d9663a4bd84c55208434e86c37452b84ed1b83142b6051b07a217d520cc5ab336810c9e0dcbe1b93bdc20699e23
7
+ data.tar.gz: b4da61298157efa7fb336d8b88b8a4c2011b6373995b27e67d7cbff1bcaeaa5dfc6571095d7020d65ea95226d47ef0f4aa4be4b15609f685ef6d4c75728d87e9
data/README.md CHANGED
@@ -60,11 +60,22 @@ Pay particular attention to `user_admin_proc`, as you will be unable to manage y
60
60
 
61
61
  ## Usage
62
62
 
63
- FinePrint adds 3 controller methods to all of your controllers:
63
+ The FinePrint module contains several methods that help you find contracts and mark them as signed:
64
64
 
65
- `fine_print_get_signatures`, `fine_print_skip_signatures` and `fine_print_return`
65
+ `get_contract(contract_object_or_id_or_name)`
66
+ `sign_contract(user, contract_object_or_id_or_name)`
67
+ `signed_contract?(user, contract_object_or_id_or_name)`
68
+ `signed_any_contract_version?(user, contract_object_or_id_or_name)`
69
+ `get_unsigned_contract_names(user, contract_names...)`
66
70
 
67
- Additionally, the FinePrint module contains several methods that help you find contracts and mark them as signed.
71
+ Additionally, FinePrint adds 2 class methods to all of your controllers:
72
+
73
+ `fine_print_get_signatures(contract_names..., options_hash)`
74
+ `fine_print_skip_signatures(contract_names..., options_hash)`
75
+
76
+ And 1 instance method, also to all of your controllers:
77
+
78
+ `fine_print_return`
68
79
 
69
80
  To require that your users sign the most recent version of a contract, call
70
81
  `fine_print_get_signatures` in your controllers, just as you would a
@@ -114,10 +125,10 @@ the names of the unsigned contracts passed along in a `terms` array in the URL p
114
125
 
115
126
  Your job as the site developer is to present the terms to the user and ask them to sign them.
116
127
  This normally involves the user clicking an "I have read the above terms" checkbox which enables an "I Agree" button.
117
- When the "Agree" button is clicked (and you should verify that the checkbox is actually clicked in the params passed to the server), you need to send the information off to a controller
118
- method that can call `FinePrint.sign_contract` which takes a user and a contract name, ID, or
119
- object. On success, this controller method can send the user back to where they were trying to
120
- go by calling the `fine_print_return` controller method (only works for GET requests).
128
+ When the "Agree" button is clicked (and you should verify that the checkbox is actually clicked in the params passed to the server),
129
+ you need to send the information off to a controller method that can call `FinePrint.sign_contract` which takes
130
+ a user and a contract name, ID, or object. On success, this controller method can send the user back to where
131
+ they were trying to go by calling the `fine_print_return` controller method (only works for GET requests).
121
132
 
122
133
  If there are multiple unsigned contracts, you are not required to get the user to sign
123
134
  them all in one page. One strategy is to present only the first unsigned contract to them
@@ -26,20 +26,20 @@ module FinePrint
26
26
  fine_print_options = options.slice(*FinePrint::SIGNATURE_OPTIONS)
27
27
 
28
28
  # Convert all names to string
29
- names = args.collect{|n| n.to_s}
29
+ names = args.flatten.collect{|n| n.to_s}
30
30
 
31
31
  class_eval do
32
32
  before_filter(filter_options) do |controller|
33
- names_to_check = names - fine_print_skipped_contract_names
33
+ contract_names = names - fine_print_skipped_contract_names
34
34
 
35
35
  # Bail if nothing to do
36
- return true if names_to_check.blank?
36
+ return true if contract_names.blank?
37
37
 
38
38
  user = send FinePrint.current_user_method
39
39
  FinePrint.raise_unless_signed_in(user)
40
40
 
41
41
  unsigned_contract_names =
42
- FinePrint.get_unsigned_contract_names(names_to_check, user)
42
+ FinePrint.get_unsigned_contract_names(user, contract_names)
43
43
  return true if unsigned_contract_names.empty?
44
44
 
45
45
  # http://stackoverflow.com/a/2165727/1664216
@@ -54,7 +54,9 @@ module FinePrint
54
54
  # See the README
55
55
  def fine_print_skip_signatures(*args)
56
56
  options = args.last.is_a?(Hash) ? args.pop : {}
57
- names = args.collect{|arg| arg.to_s}
57
+
58
+ # Convert all names to string
59
+ names = args.flatten.collect{|n| n.to_s}
58
60
 
59
61
  class_eval do
60
62
  prepend_before_filter(options) do |controller|
@@ -14,7 +14,7 @@ module FinePrint
14
14
 
15
15
  # See the README
16
16
  def fine_print_return
17
- redirect_to root_path
17
+ redirect_to session.delete(:fine_print_return_to) || root_path
18
18
  end
19
19
 
20
20
  module ClassMethods
@@ -26,20 +26,20 @@ module FinePrint
26
26
  fine_print_options = options.slice(*FinePrint::SIGNATURE_OPTIONS)
27
27
 
28
28
  # Convert all names to string
29
- names = args.collect{|n| n.to_s}
29
+ names = args.flatten.collect{|n| n.to_s}
30
30
 
31
31
  class_eval do
32
32
  before_filter(filter_options) do |controller|
33
- names_to_check = names - fine_print_skipped_contract_names
33
+ contract_names = names - fine_print_skipped_contract_names
34
34
 
35
35
  # Bail if nothing to do
36
- return true if names_to_check.blank?
36
+ return true if contract_names.blank?
37
37
 
38
38
  user = send FinePrint.current_user_method
39
39
  FinePrint.raise_unless_signed_in(user)
40
40
 
41
41
  unsigned_contract_names =
42
- FinePrint.get_unsigned_contract_names(names_to_check, user)
42
+ FinePrint.get_unsigned_contract_names(user, contract_names)
43
43
  return true if unsigned_contract_names.empty?
44
44
 
45
45
  # http://stackoverflow.com/a/2165727/1664216
@@ -54,7 +54,7 @@ module FinePrint
54
54
  # See the README
55
55
  def fine_print_skip_signatures(*args)
56
56
  options = args.last.is_a?(Hash) ? args.pop : {}
57
- names = args.collect{|arg| arg.to_s}
57
+ names = args.flatten.collect{|n| n.to_s}
58
58
 
59
59
  class_eval do
60
60
  prepend_before_filter(options) do |controller|
@@ -1,3 +1,3 @@
1
1
  module FinePrint
2
- VERSION = '1.0.0'
2
+ VERSION = '1.1.0'
3
3
  end
@@ -0,0 +1,3 @@
1
+ module FinePrint
2
+ VERSION = '1.0.0'
3
+ end
data/lib/fine_print.rb CHANGED
@@ -29,6 +29,7 @@ module FinePrint
29
29
 
30
30
  # Gets a contract given either the contract's object, ID or name
31
31
  # If given a name, it returns the latest published version of that contract
32
+ # - contract -- can be a Contract object, its ID, or its name as a String or Symbol
32
33
  #
33
34
  def self.get_contract(reference)
34
35
  ref = Integer(reference) rescue reference
@@ -42,30 +43,11 @@ module FinePrint
42
43
  end
43
44
  end
44
45
 
45
- # Returns an array of names for the contracts whose latest published
46
- # version the given user has not signed.
47
- # - names -- an array of contract names
46
+ # Records that the given user has signed the given contract
48
47
  # - user -- the user in question
48
+ # - contract -- can be a Contract object, its ID, or its name as a String or Symbol
49
49
  #
50
- def self.get_unsigned_contract_names(names, user)
51
- raise_unless_signed_in(user)
52
- return [] if names.blank?
53
- names_array = names.is_a?(Array) ? names.collect{|name| name.to_s} : [names.to_s]
54
-
55
- signed_contracts = Contract
56
- .joins(:signatures)
57
- .where({:name => names_array,
58
- :fine_print_signatures => {:user_id => user.id,
59
- :user_type => user.class.name}}).latest
60
- signed_contract_names = signed_contracts.collect{|c| c.name}
61
-
62
- return names - signed_contract_names
63
- end
64
-
65
- # Records that the given user has signed the given contract; the contract
66
- # can be a Contract object, a contract ID, or a contract name (string)
67
- #
68
- def self.sign_contract(contract, user)
50
+ def self.sign_contract(user, contract)
69
51
  raise_unless_signed_in(user)
70
52
  contract = get_contract(contract)
71
53
  raise IllegalState, 'Contract not found' if contract.nil?
@@ -76,10 +58,11 @@ module FinePrint
76
58
  end
77
59
  end
78
60
 
79
- # Returns true iff the given user has signed the given contract; the contract
80
- # can be a Contract object, a contract ID, or a contract name (string)
61
+ # Returns true iff the given user has signed the given contract
62
+ # - user -- the user in question
63
+ # - contract -- can be a Contract object, its ID, or its name as a String or Symbol
81
64
  #
82
- def self.signed_contract?(contract, user)
65
+ def self.signed_contract?(user, contract)
83
66
  raise_unless_signed_in(user)
84
67
  contract = get_contract(contract)
85
68
 
@@ -87,9 +70,10 @@ module FinePrint
87
70
  :user_type => user.class.name).first.nil?
88
71
  end
89
72
 
90
- # Returns true iff the given user has signed any version of the given contract.
73
+ # Returns true iff the given user has signed any version of the given contract
74
+ # - user -- the user in question
91
75
  # - contract -- can be a Contract object, its ID, or its name as a String or Symbol
92
- def self.signed_any_contract_version?(contract, user)
76
+ def self.signed_any_contract_version?(user, contract)
93
77
  raise_unless_signed_in(user)
94
78
  contract = get_contract(contract)
95
79
  !Signature.joins(:contract)
@@ -98,6 +82,26 @@ module FinePrint
98
82
  :user_id => user.id).first.nil?
99
83
  end
100
84
 
85
+ # Returns an array of names for the contracts whose latest published
86
+ # version the given user has not signed.
87
+ # - user -- the user in question
88
+ # - names -- contract names to check
89
+ #
90
+ def self.get_unsigned_contract_names(user, *names)
91
+ raise_unless_signed_in(user)
92
+ names = names.flatten.collect{|name| name.to_s}
93
+ return [] if names.blank?
94
+
95
+ signed_contracts = Contract
96
+ .joins(:signatures)
97
+ .where({:name => names,
98
+ :fine_print_signatures => {:user_id => user.id,
99
+ :user_type => user.class.name}}).latest
100
+ signed_contract_names = signed_contracts.collect{|c| c.name}
101
+
102
+ return names - signed_contract_names
103
+ end
104
+
101
105
  def self.is_signed_in?(user)
102
106
  user_signed_in_proc.call(user)
103
107
  end
data/lib/fine_print.rb~ CHANGED
@@ -29,6 +29,7 @@ module FinePrint
29
29
 
30
30
  # Gets a contract given either the contract's object, ID or name
31
31
  # If given a name, it returns the latest published version of that contract
32
+ # - contract -- can be a Contract object, its ID, or its name as a String or Symbol
32
33
  #
33
34
  def self.get_contract(reference)
34
35
  ref = Integer(reference) rescue reference
@@ -42,44 +43,26 @@ module FinePrint
42
43
  end
43
44
  end
44
45
 
45
- # Returns an array of names for the contracts whose latest published
46
- # version the given user has not signed.
47
- # - names -- an array of contract names
46
+ # Records that the given user has signed the given contract
48
47
  # - user -- the user in question
48
+ # - contract -- can be a Contract object, its ID, or its name as a String or Symbol
49
49
  #
50
- def self.get_unsigned_contract_names(names, user)
51
- raise_unless_signed_in(user)
52
- return [] if names.blank?
53
- names_array = names.is_a?(Array) ? names.collect{|name| name.to_s} : [names.to_s]
54
-
55
- signed_contracts = Contract
56
- .joins(:signatures)
57
- .where({:name => names_array,
58
- :fine_print_signatures => {:user_id => user.id,
59
- :user_type => user.class.name}}).latest
60
- signed_contract_names = signed_contracts.collect{|c| c.name}
61
-
62
- return names - signed_contract_names
63
- end
64
-
65
- # Records that the given user has signed the given contract; the contract
66
- # can be a Contract object, a contract ID, or a contract name (string)
67
- #
68
- def self.sign_contract(contract, user)
50
+ def self.sign_contract(user, contract)
69
51
  raise_unless_signed_in(user)
70
52
  contract = get_contract(contract)
71
53
  raise IllegalState, 'Contract not found' if contract.nil?
72
54
 
73
- sig = Signature.create do |signature|
55
+ Signature.create do |signature|
74
56
  signature.user = user
75
57
  signature.contract = contract
76
58
  end
77
59
  end
78
60
 
79
- # Returns true iff the given user has signed the given contract; the contract
80
- # can be a Contract object, a contract ID, or a contract name (string)
61
+ # Returns true iff the given user has signed the given contract
62
+ # - user -- the user in question
63
+ # - contract -- can be a Contract object, its ID, or its name as a String or Symbol
81
64
  #
82
- def self.signed_contract?(contract, user)
65
+ def self.signed_contract?(user, contract)
83
66
  raise_unless_signed_in(user)
84
67
  contract = get_contract(contract)
85
68
 
@@ -87,9 +70,10 @@ module FinePrint
87
70
  :user_type => user.class.name).first.nil?
88
71
  end
89
72
 
90
- # Returns true iff the given user has signed any version of the given contract.
73
+ # Returns true iff the given user has signed any version of the given contract
74
+ # - user -- the user in question
91
75
  # - contract -- can be a Contract object, its ID, or its name as a String or Symbol
92
- def self.signed_any_contract_version?(contract, user)
76
+ def self.signed_any_contract_version?(user, contract)
93
77
  raise_unless_signed_in(user)
94
78
  contract = get_contract(contract)
95
79
  !Signature.joins(:contract)
Binary file
@@ -1674,3 +1674,74 @@ Connecting to database specified by database.yml
1674
1674
   (4.2ms) CREATE INDEX "index_fine_print_signatures_on_contract_id" ON "fine_print_signatures" ("contract_id")
1675
1675
   (4.6ms) CREATE UNIQUE INDEX "index_fine_print_s_on_u_id_and_u_type_and_c_id" ON "fine_print_signatures" ("user_id", "user_type", "contract_id")
1676
1676
   (0.1ms) SELECT version FROM "schema_migrations"
1677
+ Connecting to database specified by database.yml
1678
+ Connecting to database specified by database.yml
1679
+ Connecting to database specified by database.yml
1680
+ Connecting to database specified by database.yml
1681
+ Connecting to database specified by database.yml
1682
+ Connecting to database specified by database.yml
1683
+ Connecting to database specified by database.yml
1684
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
1685
+  (0.1ms) select sqlite_version(*)
1686
+  (22.6ms) DROP TABLE "dummy_users"
1687
+  (5.2ms) CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "is_admin" boolean DEFAULT 'f' NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
1688
+  (5.5ms) DROP TABLE "fine_print_contracts"
1689
+  (4.5ms) CREATE TABLE "fine_print_contracts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "version" integer, "title" varchar(255) NOT NULL, "content" text NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
1690
+  (4.5ms) CREATE UNIQUE INDEX "index_fine_print_contracts_on_name_and_version" ON "fine_print_contracts" ("name", "version")
1691
+  (5.6ms) DROP TABLE "fine_print_signatures"
1692
+  (5.1ms) CREATE TABLE "fine_print_signatures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "contract_id" integer NOT NULL, "user_id" integer NOT NULL, "user_type" varchar(255) NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
1693
+  (5.0ms) CREATE INDEX "index_fine_print_signatures_on_contract_id" ON "fine_print_signatures" ("contract_id")
1694
+  (4.6ms) CREATE UNIQUE INDEX "index_fine_print_s_on_u_id_and_u_type_and_c_id" ON "fine_print_signatures" ("user_id", "user_type", "contract_id")
1695
+  (0.1ms) SELECT version FROM "schema_migrations"
1696
+ Connecting to database specified by database.yml
1697
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
1698
+  (0.1ms) select sqlite_version(*)
1699
+  (16.3ms) DROP TABLE "dummy_users"
1700
+  (5.9ms) CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "is_admin" boolean DEFAULT 'f' NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
1701
+  (4.6ms) DROP TABLE "fine_print_contracts"
1702
+  (4.4ms) CREATE TABLE "fine_print_contracts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "version" integer, "title" varchar(255) NOT NULL, "content" text NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
1703
+  (4.6ms) CREATE UNIQUE INDEX "index_fine_print_contracts_on_name_and_version" ON "fine_print_contracts" ("name", "version")
1704
+  (4.8ms) DROP TABLE "fine_print_signatures"
1705
+  (4.7ms) CREATE TABLE "fine_print_signatures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "contract_id" integer NOT NULL, "user_id" integer NOT NULL, "user_type" varchar(255) NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
1706
+  (4.5ms) CREATE INDEX "index_fine_print_signatures_on_contract_id" ON "fine_print_signatures" ("contract_id")
1707
+  (4.4ms) CREATE UNIQUE INDEX "index_fine_print_s_on_u_id_and_u_type_and_c_id" ON "fine_print_signatures" ("user_id", "user_type", "contract_id")
1708
+  (0.1ms) SELECT version FROM "schema_migrations"
1709
+ Connecting to database specified by database.yml
1710
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
1711
+  (0.1ms) select sqlite_version(*)
1712
+  (14.4ms) DROP TABLE "dummy_users"
1713
+  (5.8ms) CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "is_admin" boolean DEFAULT 'f' NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
1714
+  (5.2ms) DROP TABLE "fine_print_contracts"
1715
+  (5.4ms) CREATE TABLE "fine_print_contracts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "version" integer, "title" varchar(255) NOT NULL, "content" text NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
1716
+  (4.9ms) CREATE UNIQUE INDEX "index_fine_print_contracts_on_name_and_version" ON "fine_print_contracts" ("name", "version")
1717
+  (5.5ms) DROP TABLE "fine_print_signatures"
1718
+  (5.1ms) CREATE TABLE "fine_print_signatures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "contract_id" integer NOT NULL, "user_id" integer NOT NULL, "user_type" varchar(255) NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
1719
+  (5.4ms) CREATE INDEX "index_fine_print_signatures_on_contract_id" ON "fine_print_signatures" ("contract_id")
1720
+  (4.9ms) CREATE UNIQUE INDEX "index_fine_print_s_on_u_id_and_u_type_and_c_id" ON "fine_print_signatures" ("user_id", "user_type", "contract_id")
1721
+  (0.1ms) SELECT version FROM "schema_migrations"
1722
+ Connecting to database specified by database.yml
1723
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
1724
+  (0.2ms) select sqlite_version(*)
1725
+  (13.7ms) DROP TABLE "dummy_users"
1726
+  (5.2ms) CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "is_admin" boolean DEFAULT 'f' NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
1727
+  (5.2ms) DROP TABLE "fine_print_contracts"
1728
+  (5.2ms) CREATE TABLE "fine_print_contracts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "version" integer, "title" varchar(255) NOT NULL, "content" text NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
1729
+  (5.3ms) CREATE UNIQUE INDEX "index_fine_print_contracts_on_name_and_version" ON "fine_print_contracts" ("name", "version")
1730
+  (5.5ms) DROP TABLE "fine_print_signatures"
1731
+  (5.8ms) CREATE TABLE "fine_print_signatures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "contract_id" integer NOT NULL, "user_id" integer NOT NULL, "user_type" varchar(255) NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
1732
+  (5.3ms) CREATE INDEX "index_fine_print_signatures_on_contract_id" ON "fine_print_signatures" ("contract_id")
1733
+  (4.8ms) CREATE UNIQUE INDEX "index_fine_print_s_on_u_id_and_u_type_and_c_id" ON "fine_print_signatures" ("user_id", "user_type", "contract_id")
1734
+  (0.1ms) SELECT version FROM "schema_migrations"
1735
+ Connecting to database specified by database.yml
1736
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
1737
+  (0.1ms) select sqlite_version(*)
1738
+  (11.9ms) DROP TABLE "dummy_users"
1739
+  (4.6ms) CREATE TABLE "dummy_users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "is_admin" boolean DEFAULT 'f' NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
1740
+  (5.2ms) DROP TABLE "fine_print_contracts"
1741
+  (4.6ms) CREATE TABLE "fine_print_contracts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "version" integer, "title" varchar(255) NOT NULL, "content" text NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
1742
+  (4.4ms) CREATE UNIQUE INDEX "index_fine_print_contracts_on_name_and_version" ON "fine_print_contracts" ("name", "version")
1743
+  (5.2ms) DROP TABLE "fine_print_signatures"
1744
+  (4.7ms) CREATE TABLE "fine_print_signatures" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "contract_id" integer NOT NULL, "user_id" integer NOT NULL, "user_type" varchar(255) NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
1745
+  (4.4ms) CREATE INDEX "index_fine_print_signatures_on_contract_id" ON "fine_print_signatures" ("contract_id")
1746
+  (4.5ms) CREATE UNIQUE INDEX "index_fine_print_s_on_u_id_and_u_type_and_c_id" ON "fine_print_signatures" ("user_id", "user_type", "contract_id")
1747
+  (0.1ms) SELECT version FROM "schema_migrations"