     'chat',
     'privatemessage'
 );
+
 ALTER TYPE "api"."channel_message_type_constant_enum" OWNER TO "social";
 
 DROP TABLE IF EXISTS "api"."channel_message";
 CREATE TABLE "api"."channel_message" (
-    "id" bigint NOT NULL DEFAULT api.channel_message_next_id(),
-    "body" text COLLATE "default",
-    "slug" varchar(100) NOT NULL COLLATE "default",
+    "id" BIGINT NOT NULL DEFAULT api.channel_message_next_id (),
+    "body" TEXT COLLATE "default",
+    "slug" VARCHAR (100) NOT NULL COLLATE "default",
     "type_constant" "api"."channel_message_type_constant_enum",
-    "account_id" bigint NOT NULL,
-    "initial_channel_id" bigint NOT NULL,
-    "meta_bits" smallint NOT NULL DEFAULT 0::smallint,
-    "created_at" timestamp(6) WITH TIME ZONE NOT NULL DEFAULT now(),
-    "updated_at" timestamp(6) WITH TIME ZONE NOT NULL DEFAULT now(),
-    "deleted_at" timestamp(6) WITH TIME ZONE,
+    "account_id" BIGINT NOT NULL,
+    "initial_channel_id" BIGINT NOT NULL,
+    "meta_bits" SMALLINT NOT NULL DEFAULT 0 :: SMALLINT,
+    "created_at" TIMESTAMP (6) WITH TIME ZONE NOT NULL DEFAULT now(),
+    "updated_at" TIMESTAMP (6) WITH TIME ZONE NOT NULL DEFAULT now(),
+    "deleted_at" TIMESTAMP (6) WITH TIME ZONE,
     "payload" hstore
-)
-WITH (OIDS=FALSE);
+) WITH (OIDS = FALSE);
+
 -- ALTER TABLE "api"."channel_message" OWNER TO "socialapplication";
 GRANT SELECT, INSERT, UPDATE ON "api"."channel_message" TO "socialapplication";
 


DROP TABLE IF EXISTS "api"."interaction";
CREATE TABLE "api"."interaction" (
    "id" bigint NOT NULL DEFAULT nextval('api.interaction_id_seq'::regclass),
    "message_id" bigint NOT NULL DEFAULT 0,
    "account_id" bigint NOT NULL DEFAULT 0,
    "type_constant" "api"."interaction_type_constant_enum",
    "meta_bits" smallint NOT NULL DEFAULT 0::smallint,
    "created_at" timestamp(6) WITH TIME ZONE NOT NULL DEFAULT now()
)
WITH (OIDS=FALSE);
-- ALTER TABLE "api"."interaction" OWNER TO "socialapplication";
GRANT SELECT, INSERT, DELETE ON "api"."interaction" TO "socialapplication";


-- ----------------------------
DROP TABLE IF EXISTS "api"."message_reply";
CREATE TABLE "api"."message_reply" (
    "id" BIGINT NOT NULL DEFAULT nextval(
        'api.message_reply_id_seq' :: regclass
    ),
    "message_id" BIGINT NOT NULL DEFAULT 0,
    "reply_id" BIGINT NOT NULL DEFAULT 0,
    "meta_bits" SMALLINT NOT NULL DEFAULT 0 :: SMALLINT,
    "created_at" TIMESTAMP (6) WITH TIME ZONE NOT NULL DEFAULT now()
) WITH (OIDS = FALSE);

-- ALTER TABLE "api"."message_reply" OWNER TO "socialapplication";
GRANT SELECT, INSERT, DELETE ON "api"."message_reply" TO "socialapplication";
