Database diagrams editor that allows you to visualize and design your DB with a single query.
TypeScript databasedbdb-migrationeditorerdmariadbmssqlmysqlpostgresqlreactreact-flowschema-migrationssqlsqlitetypescriptvisualizationxyflow
import { DatabaseType } from '@/lib/domain/database-type';
import type { Template } from '../templates-data';
import image from '@/assets/templates/freescout-db.png';
import imageDark from '@/assets/templates/freescout-db-dark.png';
const now = Date.now();
export const freescoutDb: Template = {
slug: 'freescout-database',
name: 'Freescout',
shortDescription: 'Self-Hosted Zendesk',
description:
'Free self-hosted help desk & shared mailbox (Zendesk / Help Scout alternative)',
image,
imageDark,
tags: ['Postgres', 'Open Source', 'Laravel', 'PHP'],
featured: false,
url: 'https://github.com/freescout-help-desk/freescout',
diagram: {
id: 'freescout_db',
name: 'freescout-database',
createdAt: new Date(),
updatedAt: new Date(),
databaseType: DatabaseType.POSTGRESQL,
tables: [
{
id: '1fv1cbaorwobkdqcimbh3uto6',
name: 'options',
schema: 'public',
x: 2250,
y: 1100,
fields: [
{
id: 'wvjxiir18rzb12tpywxq8u2ms',
name: 'id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'gjjurwlyelsbpzd9716ouew71',
name: 'name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'fvb4jn6nryd3xcecki3f0adem',
name: 'value',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
],
indexes: [
{
id: 'bw9p2ltrzx9iz2a57kp4cpucl',
name: 'options_pkey',
unique: true,
fieldIds: ['wvjxiir18rzb12tpywxq8u2ms'],
createdAt: now,
},
{
id: 'fioogcfks0uwnvy0ejn60rxg4',
name: 'options_name_unique',
unique: true,
fieldIds: ['gjjurwlyelsbpzd9716ouew71'],
createdAt: now,
},
],
color: '#ff6363',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: '49c77bem6qy1p6uh9k4b1wjm7',
name: 'ltm_translations',
schema: 'public',
x: 900,
y: 1550,
fields: [
{
id: '88iaspkp9gj6ug6tetlnshz7t',
name: 'id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: '2wn5o1j0pn83j4ju7ak88b40i',
name: 'status',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
default: '0',
createdAt: now,
},
{
id: '0i8c5b03p0lu3prn4mhzngxmh',
name: 'locale',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'xglvo41nmuelh7mktjh2vm207',
name: 'group',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '5nb5xjsyrhye3oe5z5bjdaq0c',
name: 'key',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'dw2ynf0y5sof2c6p3z2m78iq4',
name: 'value',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'u4311lhl90qgy0c1bzgi72mrh',
name: 'created_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'xv170zj8hcq5t5hslkfuxctmh',
name: 'updated_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '7q1ob0h2kl4dnfmub3b0yz5jv',
name: 'hash',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: true,
nullable: true,
createdAt: now,
},
],
indexes: [
{
id: '25yczaens8xtyezfoydib363i',
name: 'ltm_translations_pkey',
unique: true,
fieldIds: ['88iaspkp9gj6ug6tetlnshz7t'],
createdAt: now,
},
{
id: '6tu0bt3lcoxx7zmzseor3oiy6',
name: 'ltm_translations_hash_unique',
unique: true,
fieldIds: ['7q1ob0h2kl4dnfmub3b0yz5jv'],
createdAt: now,
},
],
color: '#b067e9',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: '5doc1uac1hbcviuulb56ludlu',
name: 'threads',
schema: 'public',
x: 1127.4804184830682,
y: 1129.0739039147434,
fields: [
{
id: 'eoqmotrohwt42eiyb0abfuzig',
name: 'id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'bvndnzm3ork5nhjz5nx56ddle',
name: 'conversation_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'j9n32i9crqr7yff0boqkzmskd',
name: 'user_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '0loxug76fip17oxshft21w2tj',
name: 'type',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'jeeudln0tq4qyhzgyvz8bls5p',
name: 'subtype',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'urffrtumu8qkki7mm8ovkjkdg',
name: 'status',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'1'::smallint",
createdAt: now,
},
{
id: 'gpsp87mt86vt745jl039o3fmi',
name: 'state',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'1'::smallint",
createdAt: now,
},
{
id: 'sn2inq4g6fiw8iu6ojy9ine22',
name: 'action_type',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'dtt6b96bd36h32hx7ty9cv4vu',
name: 'action_data',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'ohpo2f3bw9psqji3w29gja7fl',
name: 'body',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'ndcicdm3rk158hnd46goyheh4',
name: 'headers',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 't4xmggqoa7ns7qvgs0qlvav6a',
name: 'from',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'uafj3vr2awbay1k80nj9tfojk',
name: 'to',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'c9jx8p2rd9wp9ne8d0rulq5y5',
name: 'cc',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '7p2sqa88omzlsy7wd3cxiatpe',
name: 'bcc',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'hiee299kuw1x3qbfjlzl59j6w',
name: 'has_attachments',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'0'::smallint",
createdAt: now,
},
{
id: 'zp9pu470z5wtyiz3snczdp5mn',
name: 'message_id',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: true,
nullable: true,
createdAt: now,
},
{
id: 'j5vz3dlkls1sus4fb3bbakzae',
name: 'source_via',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'upy07324hgp5cvrw77l01lqn7',
name: 'source_type',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'vuzadiafag7118wtn6rhdfaov',
name: 'customer_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '7gnchreukmdo2twec7vzdml53',
name: 'created_by_user_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '7qw1ebbxua7k7ng9p4kr1zeqw',
name: 'created_by_customer_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '68vr9c7gfzs9lt4jd3goeiq96',
name: 'edited_by_user_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '9iec8a3miijh8meq3hpu7ehqf',
name: 'edited_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'e78e1ppr44ane9tmj81ih121d',
name: 'body_original',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'swx0z5rwkh4byv6bybw7hxhvm',
name: 'first',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'0'::smallint",
createdAt: now,
},
{
id: 'zg5vc37wdzfn7lb7bckfmbao4',
name: 'saved_reply_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '4t976ayxkecsksdu2tv6x3548',
name: 'send_status',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'garm4xj6repcaylsl6v3pznoe',
name: 'send_status_data',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'bnpucmo2kur7qdb4rpplqrbbb',
name: 'opened_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'kw9ytr3avx5fh11e92bwwtkc0',
name: 'created_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'g13sooh41pynb6847lxeiukfe',
name: 'updated_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '4s2jt0ms6al6ih61pwpktkxfl',
name: 'meta',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'enqfw025xzjdkwqiilqofafm2',
name: 'imported',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'0'::smallint",
createdAt: now,
},
],
indexes: [
{
id: 'py0af2x18zy6czwez3wu1j0xm',
name: 'threads_conversation_id_type_from_customer_id_index',
unique: false,
fieldIds: [
'bvndnzm3ork5nhjz5nx56ddle',
'0loxug76fip17oxshft21w2tj',
't4xmggqoa7ns7qvgs0qlvav6a',
'vuzadiafag7118wtn6rhdfaov',
],
createdAt: now,
},
{
id: 'lhqsdqpvdz5fmxj3aoipfongc',
name: 'threads_conversation_id_created_at_index',
unique: false,
fieldIds: [
'bvndnzm3ork5nhjz5nx56ddle',
'kw9ytr3avx5fh11e92bwwtkc0',
],
createdAt: now,
},
{
id: 'vemck4rmt6tc0u3mpwjnpaupu',
name: 'threads_message_id_unique',
unique: true,
fieldIds: ['zp9pu470z5wtyiz3snczdp5mn'],
createdAt: now,
},
{
id: '07tmei69grvcow9a0atpqdk5e',
name: 'threads_pkey',
unique: true,
fieldIds: ['eoqmotrohwt42eiyb0abfuzig'],
createdAt: now,
},
],
color: '#ff9f74',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: '5nrs72vl175b0dg4jzxqmz7p0',
name: 'emails',
schema: 'public',
x: 327.4804184830681,
y: 1029.0739039147434,
fields: [
{
id: '64fk9mr5jo0sr2nbg0ubfy7zp',
name: 'id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'fq4d4ri3bzzo585s99usp2ri4',
name: 'customer_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'fothihiudtsiow5ke2inyadwj',
name: 'email',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: true,
nullable: false,
createdAt: now,
},
{
id: '5q0koo68awtvd3aw9iqxbibud',
name: 'type',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'1'::smallint",
createdAt: now,
},
],
indexes: [
{
id: 'kuaqauiti8a4vcxn3ejqd6xne',
name: 'emails_email_unique',
unique: true,
fieldIds: ['fothihiudtsiow5ke2inyadwj'],
createdAt: now,
},
{
id: 'dwajlbmhsa6nllt05ga9cr0ba',
name: 'emails_pkey',
unique: true,
fieldIds: ['64fk9mr5jo0sr2nbg0ubfy7zp'],
createdAt: now,
},
{
id: 's8ty46pwun6obuazpiiy4dphf',
name: 'emails_customer_id_index',
unique: false,
fieldIds: ['fq4d4ri3bzzo585s99usp2ri4'],
createdAt: now,
},
],
color: '#c05dcf',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: '999ul2ofslgmlcop8x2ulrbbo',
name: 'send_logs',
schema: 'public',
x: 727.4804184830681,
y: 1129.0739039147434,
fields: [
{
id: 'f7nwunfsnky1ste9siom9ipfu',
name: 'id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: '23epynsuxgfw014z9ntrf0oui',
name: 'thread_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'ehm4pmc96jzab65yqyc3b4nkt',
name: 'customer_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'hpjql782ldwc697lbbc9z4ona',
name: 'user_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'lfxn2089s0tq32mrbse69dgi1',
name: 'message_id',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '8jvm950eu1k1cgd4plsezgzkr',
name: 'email',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'dgkrdtf2acf5u1cxu3cvlrmc5',
name: 'mail_type',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'a5sghxgau1z613h83eqzhhg9h',
name: 'status',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '7y5bqg54i0gcubheqtiuo3ghm',
name: 'status_message',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'wqwnf4tp9nim5qui9mehcguhu',
name: 'created_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 've81ydho239e63pjclmmqcfqt',
name: 'updated_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
],
indexes: [
{
id: 'fj6vc7wk4yx0k16eb3cfijzy3',
name: 'send_logs_customer_id_mail_type_created_at_index',
unique: false,
fieldIds: [
'ehm4pmc96jzab65yqyc3b4nkt',
'dgkrdtf2acf5u1cxu3cvlrmc5',
'wqwnf4tp9nim5qui9mehcguhu',
],
createdAt: now,
},
{
id: 'c6qqhdopf9pwufd9wgpy82za7',
name: 'send_logs_pkey',
unique: true,
fieldIds: ['f7nwunfsnky1ste9siom9ipfu'],
createdAt: now,
},
{
id: 'eins8dsfh9jk89rsrpqshp0y6',
name: 'send_logs_message_id_index',
unique: false,
fieldIds: ['lfxn2089s0tq32mrbse69dgi1'],
createdAt: now,
},
{
id: 'kdg3of0ggy5qje9ih4pkjy98y',
name: 'send_logs_thread_id_index',
unique: false,
fieldIds: ['23epynsuxgfw014z9ntrf0oui'],
createdAt: now,
},
],
color: '#ff6363',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'ck9rlrh7d0q0kz2g8sasnam1e',
name: 'mailbox_user',
schema: 'public',
x: 1655.4619379214755,
y: 596.981758411997,
fields: [
{
id: 'kgkrwtfl00uiv8179oq78tsyr',
name: 'id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'wr0axmzpid0k1a6ljrk35047d',
name: 'mailbox_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'hbxej6v8ndlukld9zo4l1vxif',
name: 'user_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'jazrqbd3vuj11g8y1i5523bd4',
name: 'after_send',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'2'::smallint",
createdAt: now,
},
{
id: 'taj1v619juf7ctffsu2ofngg9',
name: 'hide',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'0'::smallint",
createdAt: now,
},
{
id: 'w34fzeowkkolvmgqt12zjcqnl',
name: 'mute',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'0'::smallint",
createdAt: now,
},
{
id: 'l9u2f24gbkym2jay5f8x7q5x5',
name: 'access',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
],
indexes: [
{
id: 'r4kq46xhltwce56wna918d1nh',
name: 'mailbox_user_mailbox_id_user_id_unique',
unique: true,
fieldIds: [
'wr0axmzpid0k1a6ljrk35047d',
'hbxej6v8ndlukld9zo4l1vxif',
],
createdAt: now,
},
{
id: 'aq2oponv57e7mmzka9kxhcq1j',
name: 'mailbox_user_mailbox_id_index',
unique: false,
fieldIds: ['wr0axmzpid0k1a6ljrk35047d'],
createdAt: now,
},
{
id: 'bnslbd0s2148irawyerz73viy',
name: 'mailbox_user_pkey',
unique: true,
fieldIds: ['kgkrwtfl00uiv8179oq78tsyr'],
createdAt: now,
},
],
color: '#42e0c0',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'fwaq7q6re40ggsle69fdcwptd',
name: 'subscriptions',
schema: 'public',
x: -41.42135623730945,
y: 877.8174593052022,
fields: [
{
id: '6tgo4yfp3mcldziji2fvq508b',
name: 'id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'sma8aa81xpzy8hr94hb6iy8nd',
name: 'user_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'udjjp3lets8h8rh2mbhfbkj1j',
name: 'medium',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'ui5kbuwf76jvccdbwuk5ze5ad',
name: 'event',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
],
indexes: [
{
id: 'xj6j4i542do33bhdu6dm4xe2i',
name: 'subscriptions_user_id_medium_event_unique',
unique: true,
fieldIds: [
'sma8aa81xpzy8hr94hb6iy8nd',
'udjjp3lets8h8rh2mbhfbkj1j',
'ui5kbuwf76jvccdbwuk5ze5ad',
],
createdAt: now,
},
{
id: '0is71abg1j6qlq0w0evv236pc',
name: 'subscriptions_user_id_event_index',
unique: false,
fieldIds: [
'sma8aa81xpzy8hr94hb6iy8nd',
'ui5kbuwf76jvccdbwuk5ze5ad',
],
createdAt: now,
},
{
id: 'yfcw5iytucvylvbf42fxcc6cu',
name: 'subscriptions_pkey',
unique: true,
fieldIds: ['6tgo4yfp3mcldziji2fvq508b'],
createdAt: now,
},
],
color: '#8eb7ff',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'hs1ncg38vva8iyx78uu00ebrk',
name: 'users',
schema: 'public',
x: 100,
y: 100,
fields: [
{
id: 'hu76etb842ke9xnz6lefj9tbj',
name: 'id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'e9eod13kjb39tr2u4tm7hpbyp',
name: 'first_name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '7scmzwm3l8ctn3lqmw5jdms4w',
name: 'last_name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'io2lellevemmqv10pqd1vl3d4',
name: 'email',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'ujqf6r1zt9a0nh2801o9vgdng',
name: 'password',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'otsgdu1ylolj3pkhj1m3mw2vh',
name: 'role',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'1'::smallint",
createdAt: now,
},
{
id: 'w0c44b2x7nsqzi6gvjq7dooyc',
name: 'timezone',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'UTC'::character varying",
createdAt: now,
},
{
id: 'p58sdf5dmd994i3echuvey86k',
name: 'photo_url',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '2wpv1d5gjdjdetuyg5kjx53a5',
name: 'type',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'1'::smallint",
createdAt: now,
},
{
id: 'zjfw9pdll2c8lo4b249yrg580',
name: 'status',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'1'::smallint",
createdAt: now,
},
{
id: 'o6wrv33d94oac1gjuqguar5rv',
name: 'invite_state',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'3'::smallint",
createdAt: now,
},
{
id: '9mt98nmwr48xg6wrnyrbapajn',
name: 'invite_hash',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'wm131n5q09po24eelz0xrqpaq',
name: 'emails',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'bhoweqhhii6v7sd13izytwx88',
name: 'job_title',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'q7kor0yntyj8sin74obgbma8u',
name: 'phone',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'kutdi8wqqg7i0lroy9raih6bq',
name: 'time_format',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'2'::smallint",
createdAt: now,
},
{
id: 'eavtv35boo1awt1xiwl2e0d32',
name: 'enable_kb_shortcuts',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'1'::smallint",
createdAt: now,
},
{
id: '4ul4b3izw7qs83hg7i3peh71m',
name: 'locked',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'0'::smallint",
createdAt: now,
},
{
id: 'f0q58tzju4o0bc3alrtvteok6',
name: 'remember_token',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'jojf42k5kw9s3vz9ovvgiri08',
name: 'locale',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'o68pc1bzz1jgn1ueahyymc46o',
name: 'created_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'gub13t4dl6gri6t98j48rxq8l',
name: 'updated_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'wbz03xdgx0nx0f76kzhia1wse',
name: 'permissions',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
],
indexes: [
{
id: 'uvk7jbufuo3594x51pjgxs21w',
name: 'users_status_index',
unique: false,
fieldIds: ['zjfw9pdll2c8lo4b249yrg580'],
createdAt: now,
},
{
id: 'f5amec8uu9y0zx08vu9jgc12j',
name: 'users_role_index',
unique: false,
fieldIds: ['otsgdu1ylolj3pkhj1m3mw2vh'],
createdAt: now,
},
{
id: 'gmuzjjxizkrqxr5e61qf6xd9k',
name: 'users_email_unique',
unique: true,
fieldIds: ['io2lellevemmqv10pqd1vl3d4'],
createdAt: now,
},
{
id: 'f9u5n0g4dd24zufncr6kmcvke',
name: 'users_pkey',
unique: true,
fieldIds: ['hu76etb842ke9xnz6lefj9tbj'],
createdAt: now,
},
],
color: '#b067e9',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'k35q5gbvcss9hpnoplg3y15z8',
name: 'notifications',
schema: 'public',
x: 1850,
y: 1100,
fields: [
{
id: '9ja23zbrvob9x9or8cuc71fyb',
name: 'id',
type: {
id: 'character',
name: 'character',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'vqotkci560hyhggmfu93sa834',
name: 'type',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'o0cx3gl58asxom5lu1p0yczzo',
name: 'notifiable_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '9fl7w5beej8cjwednhgbkfnlr',
name: 'notifiable_type',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '6ftv0bagrgfbqmi6la0g877fb',
name: 'data',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '0rk7ol1avjdtqsfhbkr43fham',
name: 'read_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '4xg3snc9qjprwc3qxrb3snmfp',
name: 'created_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'dm3dhlk00rgnt562i0kdj1osy',
name: 'updated_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
],
indexes: [
{
id: 'vjunfpml2psh9qrqo53a7w31j',
name: 'notifications_notifiable_id_notifiable_type_index',
unique: false,
fieldIds: [
'o0cx3gl58asxom5lu1p0yczzo',
'9fl7w5beej8cjwednhgbkfnlr',
],
createdAt: now,
},
{
id: 'sdwmk10husdnwybx61qqv8ev0',
name: 'notifications_pkey',
unique: true,
fieldIds: ['9ja23zbrvob9x9or8cuc71fyb'],
createdAt: now,
},
],
color: '#4dee8a',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'k9mp6fjs6syeem2a3ycbzympu',
name: 'conversation_folder',
schema: 'public',
x: 810.9916264174742,
y: 587.4639560909118,
fields: [
{
id: '1xmzqc3jchcfg967bl4zxiejf',
name: 'id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'vuaxj0lo3plruguwx35aiuxnr',
name: 'folder_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'ppm239fwj3uqfekhdi6imlyzk',
name: 'conversation_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
],
indexes: [
{
id: 'oy61a7m5gltjkn25ir2oe1i10',
name: 'conversation_folder_folder_id_conversation_id_unique',
unique: true,
fieldIds: [
'vuaxj0lo3plruguwx35aiuxnr',
'ppm239fwj3uqfekhdi6imlyzk',
],
createdAt: now,
},
{
id: 'axtukkaydok024n0fq0080g77',
name: 'conversation_folder_pkey',
unique: true,
fieldIds: ['1xmzqc3jchcfg967bl4zxiejf'],
createdAt: now,
},
],
color: '#8eb7ff',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'lwze3mybnsjl1xeirvk8hqidx',
name: 'mailboxes',
schema: 'public',
x: 1255.4619379214755,
y: 596.981758411997,
fields: [
{
id: '84dvf8cmm6mkojeko61t357ba',
name: 'id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'qid5ucko21sg0s3fnny1pnxir',
name: 'name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '6166tzowpmzawv6yax20u8pxn',
name: 'email',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'ojr5mow9riume822crulq1jjs',
name: 'aliases',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'bzego18n6wol6lrj44mcelzv1',
name: 'from_name',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'1'::smallint",
createdAt: now,
},
{
id: 'p0df0gu5jmj91g8sq8oaqm2ti',
name: 'from_name_custom',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '92r3ju9d3fbokt61eod6sqaxt',
name: 'ticket_status',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'2'::smallint",
createdAt: now,
},
{
id: 'njibjsxiygwnh2wj84ptji6b8',
name: 'ticket_assignee',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'2'::smallint",
createdAt: now,
},
{
id: 'll6eow20w4d5uj013y3d92dq3',
name: 'template',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'1'::smallint",
createdAt: now,
},
{
id: 'dt4lxu64i36dfg33bjn0je83c',
name: 'signature',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '8xg2j6ox3yddha2vz0qpo3mo7',
name: 'out_method',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'1'::smallint",
createdAt: now,
},
{
id: 'rc3kabjl8drvf138nbum1vzoo',
name: 'out_server',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'bi2u8candzk3a994xpc99ph4u',
name: 'out_username',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'npi783nsza6eby5ho8mfp8zz4',
name: 'out_password',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '2ca4f376nj10exblu7zv6bqga',
name: 'out_port',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '5uh2k3vfn7entsyag751r2r5e',
name: 'out_encryption',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'1'::smallint",
createdAt: now,
},
{
id: 'mivys5pmjfl4cxv7q9bblz3p5',
name: 'in_server',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '2j0nvhf8neld0tfmed9mpbgw0',
name: 'in_port',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
default: '143',
createdAt: now,
},
{
id: '3jdu5y6hcwstx97f6w1tuoat7',
name: 'in_username',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'bxplo3u19d1vy585zije88hrl',
name: 'in_password',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'il0hgfckaoiutw47jqo9uh46s',
name: 'in_protocol',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'1'::smallint",
createdAt: now,
},
{
id: 'ybt5nivk2jmjqysn8icnr0rnd',
name: 'in_encryption',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'1'::smallint",
createdAt: now,
},
{
id: 'c9p3ydhmu4duvovuca0jwqzpd',
name: 'auto_reply_enabled',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'0'::smallint",
createdAt: now,
},
{
id: 'nk5tow6nh4hm9me741g3m28uv',
name: 'auto_reply_subject',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'yl3afxb1jcxce4osfo1xzns2y',
name: 'auto_reply_message',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '0rozwquor95y0fi2mm6syzv51',
name: 'office_hours_enabled',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'0'::smallint",
createdAt: now,
},
{
id: 'f9hcxyld8d4izdmg0hqabxarv',
name: 'ratings',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'0'::smallint",
createdAt: now,
},
{
id: '03reu09i44rfsybclip1tgfn6',
name: 'ratings_placement',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'1'::smallint",
createdAt: now,
},
{
id: 'm9jidpkbwj377fez4o5n8fl8l',
name: 'ratings_text',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '9qmbagvrsezsyywhs9h6bk85z',
name: 'created_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'nf7pcwqji5oyouw30hqiq7ktu',
name: 'updated_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'pyozbpteexnbow14e49a7hedu',
name: 'in_validate_cert',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'1'::smallint",
createdAt: now,
},
{
id: 'aamwg2ugyrarx1dzfhzspbriu',
name: 'in_imap_folders',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'h1km32j0xkgf3e0jcvwqas5zf',
name: 'auto_bcc',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'wc2bj6egk8459d300hu1846tq',
name: 'before_reply',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '1fp2ta6e0culxzej7yx55vwkm',
name: 'imap_sent_folder',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'pvouz3rckq7h9t00hvzf1pm10',
name: 'meta',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
],
indexes: [
{
id: 'ny49mm0oi1fot3mhxvelq6tly',
name: 'mailboxes_email_unique',
unique: true,
fieldIds: ['6166tzowpmzawv6yax20u8pxn'],
createdAt: now,
},
{
id: '2bikzgeuzlm7ci46wujtn3cfz',
name: 'mailboxes_pkey',
unique: true,
fieldIds: ['84dvf8cmm6mkojeko61t357ba'],
createdAt: now,
},
],
color: '#4dee8a',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'nr765aq8164z3ear2qgvftf3z',
name: 'conversations',
schema: 'public',
x: 900,
y: 100,
fields: [
{
id: '1c3g2chxycqcxitfnuvecju9c',
name: 'id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: '7bt9q1nl68pj5yurefezv3tez',
name: 'number',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'n1xxf6m4yg0fnwjy9jj5uvujw',
name: 'threads_count',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
default: '0',
createdAt: now,
},
{
id: '3qobeq1v0fb7jvl1f0z0lln64',
name: 'type',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'aumvxyqmyqw54ug7iufqlno6u',
name: 'folder_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'pxcn0rmxoey8u8ryngx43gilc',
name: 'status',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'1'::smallint",
createdAt: now,
},
{
id: '1rqehm98664p9t50m3xi7c4t4',
name: 'state',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'1'::smallint",
createdAt: now,
},
{
id: '1vf56n649iui64j4cdplz2ljs',
name: 'subject',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'ffvumzmo0wlygqvgn5bl53kbn',
name: 'customer_email',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '35mrdn2u6a5lbgsv7rnfyw158',
name: 'cc',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'ikh75pbksoizqm3p8mg1txcfc',
name: 'bcc',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'pkh9u70a9grvp4sqyz3tu9tel',
name: 'preview',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '5bgphg2d0k17hqkydlzogk3bk',
name: 'imported',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'0'::smallint",
createdAt: now,
},
{
id: '46kv7f9c4x1r5ecy9huycjkj4',
name: 'has_attachments',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'0'::smallint",
createdAt: now,
},
{
id: 'u3grol8sh60auqhmb46il31qt',
name: 'mailbox_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'tzhurk0rph6q6hejh9s1d6lvk',
name: 'user_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '4xhjnw5z8fumbmnhvm5hbik97',
name: 'customer_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '4q366uvk8dwm6lpvukcux4vtv',
name: 'created_by_user_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'yb2225td88wizr7afzpabbjp8',
name: 'created_by_customer_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'yzdtfyi7tkndpc9e3h6xa2y3u',
name: 'source_via',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '1edrmchm5pfcwx0s4ud1oza0z',
name: 'source_type',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '3pwkzenhe4h1j8l8atndtufn4',
name: 'closed_by_user_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'a4wanvsqzdvnvce9piy3k7tbc',
name: 'closed_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'c9p2kszw4daqdtuhwf2xz09zj',
name: 'user_updated_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '1lrv2tfap1vg8qwm7l990xjfg',
name: 'last_reply_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '4lzvz1joayso8iwnmulwn1ljb',
name: 'last_reply_from',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'cij21vpcxi2lexyvwkxc8kunm',
name: 'read_by_user',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'0'::smallint",
createdAt: now,
},
{
id: 'p7trzn2m7gmv93mfa7jw10k9f',
name: 'created_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'rg3zyfgnmusc9jndupv92ki1w',
name: 'updated_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'zcylbd4157xcdlhkgjlend8wu',
name: 'channel',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
],
indexes: [
{
id: 'r82jecwf4jrvaul7x5jpdxckd',
name: 'conversations_pkey',
unique: true,
fieldIds: ['1c3g2chxycqcxitfnuvecju9c'],
createdAt: now,
},
{
id: 'qk2qvmjmzbylhh1xi718ijmce',
name: 'conversations_status_state_mailbox_id_user_id_index',
unique: false,
fieldIds: [
'pxcn0rmxoey8u8ryngx43gilc',
'1rqehm98664p9t50m3xi7c4t4',
'u3grol8sh60auqhmb46il31qt',
'tzhurk0rph6q6hejh9s1d6lvk',
],
createdAt: now,
},
{
id: '3qnalruteodf3lh9qwrcu63cc',
name: 'conversations_folder_id_status_index',
unique: false,
fieldIds: [
'aumvxyqmyqw54ug7iufqlno6u',
'pxcn0rmxoey8u8ryngx43gilc',
],
createdAt: now,
},
{
id: 'nfcg2qvxd61ysikaphtzqq5u3',
name: 'conversations_mailbox_id_customer_id_index',
unique: false,
fieldIds: [
'u3grol8sh60auqhmb46il31qt',
'4xhjnw5z8fumbmnhvm5hbik97',
],
createdAt: now,
},
{
id: '20esfkwq9lwj6n2sbqo96lmw8',
name: 'conversations_folder_id_state_index',
unique: false,
fieldIds: [
'aumvxyqmyqw54ug7iufqlno6u',
'1rqehm98664p9t50m3xi7c4t4',
],
createdAt: now,
},
],
color: '#8eb7ff',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'pstuez95unibuz9m432ttiaq8',
name: 'folders',
schema: 'public',
x: 500,
y: 100,
fields: [
{
id: 'k99gqhg7bsa198yp9028t67e4',
name: 'id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: '05tpurqvc8jub6pzcurtzm206',
name: 'mailbox_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'rzoimc5y1jj9pay6rpd740fhb',
name: 'user_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'uwegfahvabbw2x0kk061e49o0',
name: 'type',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '75l5au1ale1e2qxmompi4vw6a',
name: 'total_count',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
default: '0',
createdAt: now,
},
{
id: 'twfvvm1oussu57o6fi9l65hqo',
name: 'active_count',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
default: '0',
createdAt: now,
},
{
id: 'k07pp6jhj3my2zljt135og95m',
name: 'meta',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
],
indexes: [
{
id: 'gq5luv0khmds9ejbh7t3tac2k',
name: 'folders_mailbox_id_user_id_type_index',
unique: false,
fieldIds: [
'05tpurqvc8jub6pzcurtzm206',
'rzoimc5y1jj9pay6rpd740fhb',
'uwegfahvabbw2x0kk061e49o0',
],
createdAt: now,
},
{
id: '7j2gzrwsrp5v26jgz3lbzacnd',
name: 'folders_pkey',
unique: true,
fieldIds: ['k99gqhg7bsa198yp9028t67e4'],
createdAt: now,
},
],
color: '#ffe374',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'qyo9r01gsrv6snr9xdu3adjce',
name: 'modules',
schema: 'public',
x: 1300,
y: 1550,
fields: [
{
id: '18hyyonqy50islcv19kcwt862',
name: 'id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'd8ldgx6jfz5z77tnrb1avjhad',
name: 'alias',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'ro0i9aglttom9c58s2vpfygwm',
name: 'active',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'0'::smallint",
createdAt: now,
},
{
id: 'qdu1n54hblp2t69kmyz4iku4d',
name: 'activated',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'0'::smallint",
createdAt: now,
},
{
id: 'f8tj1y4elgz8c63p6eqpiq6s0',
name: 'license',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
],
indexes: [
{
id: 'jreoixknfnoousv12yhvws47h',
name: 'modules_pkey',
unique: true,
fieldIds: ['18hyyonqy50islcv19kcwt862'],
createdAt: now,
},
{
id: 'e7787gs85efzboqved9kq8jjo',
name: 'modules_alias_unique',
unique: true,
fieldIds: ['d8ldgx6jfz5z77tnrb1avjhad'],
createdAt: now,
},
],
color: '#b067e9',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'td5w6pn2ug5a57myjs84w01dl',
name: 'polycast_events',
schema: 'public',
x: 100,
y: 1600,
fields: [
{
id: 'e2lp6tusug085wg1acs7w55r9',
name: 'id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'b380a7z8b40ezdi1j6npjeahg',
name: 'channels',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '753k4jnrocvjdv54y583gez9j',
name: 'event',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '2u4epep4q7h2krpt1xtjx09iv',
name: 'payload',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '0dz3rzwcqrbup2diz506616je',
name: 'created_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
],
indexes: [
{
id: '2po2pulvo6uqfdppgj6stsc7e',
name: 'polycast_events_created_at_index',
unique: false,
fieldIds: ['0dz3rzwcqrbup2diz506616je'],
createdAt: now,
},
{
id: 'm3i89z8aztxswwy331bx1mcr7',
name: 'polycast_events_pkey',
unique: true,
fieldIds: ['e2lp6tusug085wg1acs7w55r9'],
createdAt: now,
},
],
color: '#7175fa',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'tvrr6hp9u20zyq3g2snfz9p3s',
name: 'followers',
schema: 'public',
x: 1300,
y: 100,
fields: [
{
id: '34j7ppxntrzak3akfzkgto7pd',
name: 'id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'c69y79id2lwquj5cq0mq7f8i7',
name: 'conversation_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '874o91f3v01cbyxvf66rt6hvg',
name: 'user_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '1xjc0sjwavdpb6w8qsb2stu08',
name: 'added_by_user_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
],
indexes: [
{
id: 'chgaj5bsuox96owo11cin9mr5',
name: 'followers_pkey',
unique: true,
fieldIds: ['34j7ppxntrzak3akfzkgto7pd'],
createdAt: now,
},
{
id: 'x2shxunxkv7x7bc9ts9p6yam3',
name: 'followers_conversation_id_user_id_unique',
unique: true,
fieldIds: [
'c69y79id2lwquj5cq0mq7f8i7',
'874o91f3v01cbyxvf66rt6hvg',
],
createdAt: now,
},
],
color: '#7175fa',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'uqtl4b2c4d6faxn2y5pcsiv9s',
name: 'activity_logs',
schema: 'public',
x: 500,
y: 1550,
fields: [
{
id: 'x22cjj0vpxh5w650xnxfl4krw',
name: 'id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'okreroq5gh9kiebykn4x001ca',
name: 'log_name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'lp06c5s7c43qngr2kdr62wkhm',
name: 'description',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '49t2extlae4ke7d2qjaxpdhu7',
name: 'subject_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'k3po3jv2gfixd443wgtyq8mqg',
name: 'subject_type',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'utepj3501xmpmka1tlmgy8mi5',
name: 'causer_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '62mug1bmnhiq8c1j94b0ufagq',
name: 'causer_type',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '9wedla2am4iucpu8m8mgfjqe1',
name: 'properties',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'rw4h4n25cbahsputjgplvegxo',
name: 'created_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'uwjmvcu5jr5j4hn60oh4g9vju',
name: 'updated_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
],
indexes: [
{
id: '1hcz7o7vtcaa4f9bn1p5hna44',
name: 'activity_logs_pkey',
unique: true,
fieldIds: ['x22cjj0vpxh5w650xnxfl4krw'],
createdAt: now,
},
{
id: '5c6tkfpg1sv0kov3d0cjsn74y',
name: 'activity_logs_log_name_index',
unique: false,
fieldIds: ['okreroq5gh9kiebykn4x001ca'],
createdAt: now,
},
],
color: '#ff6363',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'vukxmild0u6edqfu7mn583tm2',
name: 'customers',
schema: 'public',
x: 327.4804184830681,
y: 529.0739039147434,
fields: [
{
id: 'sdqj45csi5jx9s5c3puk93ff5',
name: 'id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'l5pku40a2ej38dqimhalv27u6',
name: 'first_name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'gcode5fu8bstohoz8lyb8in51',
name: 'last_name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'ncp7qvkk7a0l340f091mxa3ad',
name: 'company',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '072ghm1l94w05n488h9jonmv9',
name: 'job_title',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '2tp6ywsli3fm6ce7aks0bp0yw',
name: 'photo_type',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '0tmc3axd5t9aa44eciou97o19',
name: 'photo_url',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '5778shpm2eff1ytowb9upfppz',
name: 'phones',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'c7v5vnof9a70zneeym91gxjtk',
name: 'websites',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'pu5uc0kk54uzbs24wlylf9eg2',
name: 'social_profiles',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'd8zxejqnewhqi6l4khg900d2z',
name: 'notes',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'ofqdoqpokxvncigp9q04h0z5s',
name: 'address',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '4pwuubpdhpub39wh0w6zetmam',
name: 'city',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '4hmuod8f07ehnp0tdre6vffov',
name: 'state',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '437xmeex7pljt3l9ckb53vchn',
name: 'zip',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '4zj6y5007m1i108u1pm91oa80',
name: 'country',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'i67a6rg0v7kk6e6510j0b9wot',
name: 'created_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'r92bl4890lazgch07rcdncfa6',
name: 'updated_at',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '6m9kmufzpptwhu4n6jgek3jko',
name: 'channel',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'ozuv0sxu2hpdo5dkkn0n7gjfc',
name: 'channel_id',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'xpfza2t9bfbx0rfp9w4h4cz6k',
name: 'meta',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
],
indexes: [
{
id: 'ytzs9b7co95yf434v8pf7bm11',
name: 'customers_first_name_last_name_index',
unique: false,
fieldIds: [
'l5pku40a2ej38dqimhalv27u6',
'gcode5fu8bstohoz8lyb8in51',
],
createdAt: now,
},
{
id: 'om4pbob46f2wmx5ppqo41njcj',
name: 'customers_pkey',
unique: true,
fieldIds: ['sdqj45csi5jx9s5c3puk93ff5'],
createdAt: now,
},
],
color: '#7175fa',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'yeat02slxfum25j3xl4476ws9',
name: 'attachments',
schema: 'public',
x: 1527.4804184830682,
y: 1129.0739039147434,
fields: [
{
id: 't2llx2e10neozcknty4mxph8a',
name: 'id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'oklc1xzn486skbhey08khyjib',
name: 'thread_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '1n0zjemyudn5u6qq1uw4q97la',
name: 'user_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'hi4r49ggsb6lwzq58werf2m4z',
name: 'file_dir',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'qi94uko7f4z84bn44mt7n4q8i',
name: 'file_name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '154o9mk1m6vymqelb3cnaaz0s',
name: 'mime_type',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'qnmlohtzlkdb0i6gavcunfjqu',
name: 'type',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'frpcaize0jh4p50kmqf8vo9to',
name: 'size',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'a9132bv83bc1swdoqbyj0bqke',
name: 'embedded',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'0'::smallint",
createdAt: now,
},
{
id: 'uecj06p85t5cpzywmycurbucn',
name: 'public',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: "'0'::smallint",
createdAt: now,
},
],
indexes: [
{
id: 'mc99knwp9jvxri8rj3sueynro',
name: 'attachments_thread_id_embedded_index',
unique: false,
fieldIds: [
'oklc1xzn486skbhey08khyjib',
'a9132bv83bc1swdoqbyj0bqke',
],
createdAt: now,
},
{
id: 'pr5oflsbs4h8t7p0gqcecflef',
name: 'attachments_pkey',
unique: true,
fieldIds: ['t2llx2e10neozcknty4mxph8a'],
createdAt: now,
},
],
color: '#9ef07a',
isView: false,
isMaterializedView: false,
createdAt: now,
},
],
relationships: [
{
id: '1pa5lvh1228l5j11rtxcqcdd3',
name: 'conversation_folder_folder_id_foreign',
sourceSchema: 'public',
targetSchema: 'public',
sourceTableId: 'k9mp6fjs6syeem2a3ycbzympu',
targetTableId: 'pstuez95unibuz9m432ttiaq8',
sourceFieldId: 'vuaxj0lo3plruguwx35aiuxnr',
targetFieldId: 'k99gqhg7bsa198yp9028t67e4',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: '3pv51e2idsxjc6n1rns2zftso',
name: 'send_logs_customer_id_foreign',
sourceSchema: 'public',
targetSchema: 'public',
sourceTableId: '999ul2ofslgmlcop8x2ulrbbo',
targetTableId: 'vukxmild0u6edqfu7mn583tm2',
sourceFieldId: 'ehm4pmc96jzab65yqyc3b4nkt',
targetFieldId: 'sdqj45csi5jx9s5c3puk93ff5',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: '4tmqt6e3qsi2fw3f9pu7huvev',
name: 'conversations_user_id_foreign',
sourceSchema: 'public',
targetSchema: 'public',
sourceTableId: 'nr765aq8164z3ear2qgvftf3z',
targetTableId: 'hs1ncg38vva8iyx78uu00ebrk',
sourceFieldId: 'tzhurk0rph6q6hejh9s1d6lvk',
targetFieldId: 'hu76etb842ke9xnz6lefj9tbj',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'alow3hzw79nt17najsxf9oi9f',
name: 'conversations_folder_id_foreign',
sourceSchema: 'public',
targetSchema: 'public',
sourceTableId: 'nr765aq8164z3ear2qgvftf3z',
targetTableId: 'pstuez95unibuz9m432ttiaq8',
sourceFieldId: 'aumvxyqmyqw54ug7iufqlno6u',
targetFieldId: 'k99gqhg7bsa198yp9028t67e4',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'axr0f3i9vg7hkaf7j68e6xek5',
name: 'mailbox_user_user_id_foreign',
sourceSchema: 'public',
targetSchema: 'public',
sourceTableId: 'ck9rlrh7d0q0kz2g8sasnam1e',
targetTableId: 'hs1ncg38vva8iyx78uu00ebrk',
sourceFieldId: 'hbxej6v8ndlukld9zo4l1vxif',
targetFieldId: 'hu76etb842ke9xnz6lefj9tbj',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'b49iu18vpgq2cfo4509fe2xgl',
name: 'conversation_folder_conversation_id_foreign',
sourceSchema: 'public',
targetSchema: 'public',
sourceTableId: 'k9mp6fjs6syeem2a3ycbzympu',
targetTableId: 'nr765aq8164z3ear2qgvftf3z',
sourceFieldId: 'ppm239fwj3uqfekhdi6imlyzk',
targetFieldId: '1c3g2chxycqcxitfnuvecju9c',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'bqw7xws8ybijn46gun5nongot',
name: 'conversations_mailbox_id_foreign',
sourceSchema: 'public',
targetSchema: 'public',
sourceTableId: 'nr765aq8164z3ear2qgvftf3z',
targetTableId: 'lwze3mybnsjl1xeirvk8hqidx',
sourceFieldId: 'u3grol8sh60auqhmb46il31qt',
targetFieldId: '84dvf8cmm6mkojeko61t357ba',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'juvy3ibjmjbv1d45usrxy5k7w',
name: 'send_logs_thread_id_foreign',
sourceSchema: 'public',
targetSchema: 'public',
sourceTableId: '999ul2ofslgmlcop8x2ulrbbo',
targetTableId: '5doc1uac1hbcviuulb56ludlu',
sourceFieldId: '23epynsuxgfw014z9ntrf0oui',
targetFieldId: 'eoqmotrohwt42eiyb0abfuzig',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'k0rx46rhs5b65yafs02v218i2',
name: 'send_logs_user_id_foreign',
sourceSchema: 'public',
targetSchema: 'public',
sourceTableId: '999ul2ofslgmlcop8x2ulrbbo',
targetTableId: 'hs1ncg38vva8iyx78uu00ebrk',
sourceFieldId: 'hpjql782ldwc697lbbc9z4ona',
targetFieldId: 'hu76etb842ke9xnz6lefj9tbj',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'pv7o59t1np1ol1nt4hw3um9n4',
name: 'mailbox_user_mailbox_id_foreign',
sourceSchema: 'public',
targetSchema: 'public',
sourceTableId: 'ck9rlrh7d0q0kz2g8sasnam1e',
targetTableId: 'lwze3mybnsjl1xeirvk8hqidx',
sourceFieldId: 'wr0axmzpid0k1a6ljrk35047d',
targetFieldId: '84dvf8cmm6mkojeko61t357ba',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'qds6szdl6kzln0k9vy24rpnrj',
name: 'threads_customer_id_foreign',
sourceSchema: 'public',
targetSchema: 'public',
sourceTableId: '5doc1uac1hbcviuulb56ludlu',
targetTableId: 'vukxmild0u6edqfu7mn583tm2',
sourceFieldId: 'vuzadiafag7118wtn6rhdfaov',
targetFieldId: 'sdqj45csi5jx9s5c3puk93ff5',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'ri2rorvgbga3t8aukzkz44bms',
name: 'followers_conversation_id_foreign',
sourceSchema: 'public',
targetSchema: 'public',
sourceTableId: 'tvrr6hp9u20zyq3g2snfz9p3s',
targetTableId: 'nr765aq8164z3ear2qgvftf3z',
sourceFieldId: 'c69y79id2lwquj5cq0mq7f8i7',
targetFieldId: '1c3g2chxycqcxitfnuvecju9c',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'rw140tgmcq5don2djypdmma4g',
name: 'subscriptions_user_id_foreign',
sourceSchema: 'public',
targetSchema: 'public',
sourceTableId: 'fwaq7q6re40ggsle69fdcwptd',
targetTableId: 'hs1ncg38vva8iyx78uu00ebrk',
sourceFieldId: 'sma8aa81xpzy8hr94hb6iy8nd',
targetFieldId: 'hu76etb842ke9xnz6lefj9tbj',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'rwbqneeob6z0869g048ds9a5p',
name: 'threads_conversation_id_foreign',
sourceSchema: 'public',
targetSchema: 'public',
sourceTableId: '5doc1uac1hbcviuulb56ludlu',
targetTableId: 'nr765aq8164z3ear2qgvftf3z',
sourceFieldId: 'bvndnzm3ork5nhjz5nx56ddle',
targetFieldId: '1c3g2chxycqcxitfnuvecju9c',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 's1ykexr9gpl1nrz4e8b6jxft9',
name: 'conversations_customer_id_foreign',
sourceSchema: 'public',
targetSchema: 'public',
sourceTableId: 'nr765aq8164z3ear2qgvftf3z',
targetTableId: 'vukxmild0u6edqfu7mn583tm2',
sourceFieldId: '4xhjnw5z8fumbmnhvm5hbik97',
targetFieldId: 'sdqj45csi5jx9s5c3puk93ff5',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'tc5gks8j3c7ew7gqjrj9fqdpo',
name: 'folders_mailbox_id_foreign',
sourceSchema: 'public',
targetSchema: 'public',
sourceTableId: 'pstuez95unibuz9m432ttiaq8',
targetTableId: 'lwze3mybnsjl1xeirvk8hqidx',
sourceFieldId: '05tpurqvc8jub6pzcurtzm206',
targetFieldId: '84dvf8cmm6mkojeko61t357ba',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'v9dvus9yruh9sz3d6s6txta8s',
name: 'folders_user_id_foreign',
sourceSchema: 'public',
targetSchema: 'public',
sourceTableId: 'pstuez95unibuz9m432ttiaq8',
targetTableId: 'hs1ncg38vva8iyx78uu00ebrk',
sourceFieldId: 'rzoimc5y1jj9pay6rpd740fhb',
targetFieldId: 'hu76etb842ke9xnz6lefj9tbj',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'vb5unhxedgetf958uyfekm35v',
name: 'followers_user_id_foreign',
sourceSchema: 'public',
targetSchema: 'public',
sourceTableId: 'tvrr6hp9u20zyq3g2snfz9p3s',
targetTableId: 'hs1ncg38vva8iyx78uu00ebrk',
sourceFieldId: '874o91f3v01cbyxvf66rt6hvg',
targetFieldId: 'hu76etb842ke9xnz6lefj9tbj',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'vcr0nrk47ldp7by1qoxpwwzpc',
name: 'threads_user_id_foreign',
sourceSchema: 'public',
targetSchema: 'public',
sourceTableId: '5doc1uac1hbcviuulb56ludlu',
targetTableId: 'hs1ncg38vva8iyx78uu00ebrk',
sourceFieldId: 'j9n32i9crqr7yff0boqkzmskd',
targetFieldId: 'hu76etb842ke9xnz6lefj9tbj',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'xyp92dy9gvuqzq74obdba09k4',
name: 'attachments_user_id_foreign',
sourceSchema: 'public',
targetSchema: 'public',
sourceTableId: 'yeat02slxfum25j3xl4476ws9',
targetTableId: 'hs1ncg38vva8iyx78uu00ebrk',
sourceFieldId: '1n0zjemyudn5u6qq1uw4q97la',
targetFieldId: 'hu76etb842ke9xnz6lefj9tbj',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'z3lde2qwwonkk1rtsy62dc2op',
name: 'attachments_thread_id_foreign',
sourceSchema: 'public',
targetSchema: 'public',
sourceTableId: 'yeat02slxfum25j3xl4476ws9',
targetTableId: '5doc1uac1hbcviuulb56ludlu',
sourceFieldId: 'oklc1xzn486skbhey08khyjib',
targetFieldId: 'eoqmotrohwt42eiyb0abfuzig',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'zr9pevbwgri8lj8m4x8ynohcl',
name: 'emails_customer_id_foreign',
sourceSchema: 'public',
targetSchema: 'public',
sourceTableId: '5nrs72vl175b0dg4jzxqmz7p0',
targetTableId: 'vukxmild0u6edqfu7mn583tm2',
sourceFieldId: 'fq4d4ri3bzzo585s99usp2ri4',
targetFieldId: 'sdqj45csi5jx9s5c3puk93ff5',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
],
dependencies: [],
},
};