Surface regulation and user agent across consent record API layers
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -40,8 +40,8 @@ type (
|
||||
ConsentData json.RawMessage `db:"consent_data"`
|
||||
Action CookieConsentAction `db:"action"`
|
||||
SdkVersion string `db:"sdk_version"`
|
||||
Regulation Regulation `db:"regulation"`
|
||||
CountryCode CountryCode `db:"country_code"`
|
||||
Regulation *Regulation `db:"regulation"`
|
||||
CountryCode *CountryCode `db:"country_code"`
|
||||
CreatedAt time.Time `db:"created_at"`
|
||||
}
|
||||
|
||||
|
||||
22
pkg/coredata/migrations/20260507T143000Z.sql
Normal file
22
pkg/coredata/migrations/20260507T143000Z.sql
Normal file
@@ -0,0 +1,22 @@
|
||||
-- Copyright (c) 2026 Probo Inc <hello@getprobo.com>.
|
||||
--
|
||||
-- Permission to use, copy, modify, and/or distribute this software for any
|
||||
-- purpose with or without fee is hereby granted, provided that the above
|
||||
-- copyright notice and this permission notice appear in all copies.
|
||||
--
|
||||
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
-- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
-- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
-- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
-- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
-- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
-- PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
ALTER TABLE cookie_consent_records
|
||||
ALTER COLUMN regulation DROP NOT NULL;
|
||||
|
||||
ALTER TABLE cookie_consent_records
|
||||
ALTER COLUMN country_code DROP NOT NULL;
|
||||
|
||||
UPDATE cookie_consent_records SET regulation = NULL WHERE regulation = '';
|
||||
UPDATE cookie_consent_records SET country_code = NULL WHERE country_code = '';
|
||||
Reference in New Issue
Block a user