Added script to create table frontend_signales in PG
This commit is contained in:
parent
b5bfc32f38
commit
1945640ca7
2 changed files with 34 additions and 1 deletions
20
ee/scripts/schema/db/init_dbs/postgresql/1.10.0/1.10.0.sql
Normal file
20
ee/scripts/schema/db/init_dbs/postgresql/1.10.0/1.10.0.sql
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
BEGIN;
|
||||
CREATE OR REPLACE FUNCTION openreplay_version()
|
||||
RETURNS text AS
|
||||
$$
|
||||
SELECT 'v1.10.0-ee'
|
||||
$$ LANGUAGE sql IMMUTABLE;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS frontend_signals
|
||||
(
|
||||
project_id bigint NOT NULL,
|
||||
user_id text NOT NULL,
|
||||
timestamp bigint NOT NULL,
|
||||
action text NOT NULL,
|
||||
source text NOT NULL,
|
||||
category text NOT NULL,
|
||||
data json
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS frontend_signals_user_id_idx ON frontend_signals (user_id);
|
||||
|
||||
COMMIT;
|
||||
|
|
@ -646,6 +646,19 @@ $$
|
|||
CREATE INDEX IF NOT EXISTS user_favorite_sessions_user_id_session_id_idx ON user_favorite_sessions (user_id, session_id);
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS frontend_signals
|
||||
(
|
||||
project_id bigint NOT NULL,
|
||||
user_id text NOT NULL,
|
||||
timestamp bigint NOT NULL,
|
||||
action text NOT NULL,
|
||||
source text NOT NULL,
|
||||
category text NOT NULL,
|
||||
data json
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS frontend_signals_user_id_idx ON frontend_signals (user_id);
|
||||
|
||||
|
||||
CREATE TABLE IF NOT EXISTS assigned_sessions
|
||||
(
|
||||
session_id bigint NOT NULL REFERENCES sessions (session_id) ON DELETE CASCADE,
|
||||
|
|
@ -1491,4 +1504,4 @@ ON CONFLICT (predefined_key) DO UPDATE
|
|||
metric_type=excluded.metric_type,
|
||||
view_type=excluded.view_type;
|
||||
|
||||
COMMIT;
|
||||
COMMIT;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue