Last active
August 29, 2015 14:00
-
-
Save davenotik/02c7709f03828f3ce8ee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Table: "CommunityGroupLink" | |
-- DROP TABLE "CommunityGroupLink"; | |
CREATE TABLE "CommunityGroupLink" | |
( | |
"communityId" integer, | |
"groupId" integer, | |
id serial NOT NULL, | |
CONSTRAINT "CommunityGroupLink_pkey" PRIMARY KEY (id) | |
) | |
WITH ( | |
OIDS=FALSE | |
); | |
ALTER TABLE "CommunityGroupLink" | |
OWNER TO postgres; | |
-- Index: "CommunityGroupLink_communityId_idx" | |
-- DROP INDEX "CommunityGroupLink_communityId_idx"; | |
CREATE INDEX "CommunityGroupLink_communityId_idx" | |
ON "CommunityGroupLink" | |
USING btree | |
("communityId"); | |
-- Index: "CommunityGroupLink_groupId_idx" | |
-- DROP INDEX "CommunityGroupLink_groupId_idx"; | |
CREATE INDEX "CommunityGroupLink_groupId_idx" | |
ON "CommunityGroupLink" | |
USING btree | |
("groupId"); | |
-- Index: combined_idx | |
-- DROP INDEX combined_idx; | |
CREATE INDEX combined_idx | |
ON "CommunityGroupLink" | |
USING btree | |
("groupId", "communityId"); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
part of models; | |
class CommunityGroupLink extends BaseModel { | |
var fields = ['id', 'communityId', 'groupId']; | |
get communityId => getProperty('communityId'); | |
set communityId(value) => setProperty('communityId', value); | |
get groupId => getProperty('groupId'); | |
set groupId(value) => setProperty('groupId', value); | |
String get dbType => 'CommunityGroupLink'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Table: "NewsArticle" | |
-- DROP TABLE "NewsArticle"; | |
CREATE TABLE "NewsArticle" | |
( | |
id serial NOT NULL, | |
"oldId" character varying, | |
"baseContentTypeId" integer, | |
title character varying, | |
"titleSoundex" character varying, | |
votes integer, | |
"numberOfComments" integer, | |
url character varying, | |
"canonicalizedUrl" character varying, | |
"visualGridThumbnail" character varying, | |
"visualGridThumbnailSize" character varying, | |
description text, | |
teaser text, | |
"unassociatedScreenName" character varying, | |
"unassociatedName" character varying, | |
"groupId" integer, | |
"communityId" integer, | |
"hashtagTargetId" integer, | |
"hashtagTargetGroupId" integer, | |
"feedId" integer, | |
tweeted boolean, | |
"hasActivity" boolean, | |
"lastActivityOn" date, | |
"onDemandCrawled" date, | |
"sortDate" timestamp without time zone, | |
"shortUrl" character varying, | |
"instagramId" character varying, | |
"publicationDate" timestamp without time zone, | |
userid integer, | |
"userId" integer, | |
images character varying[], | |
hashtags character varying[], | |
mentions character varying[], | |
videos character varying[], | |
"imageThumbnailSizes" character varying[], | |
"imageThumbnails" character varying[], | |
"groupIdOld" character varying, | |
"feedIdOld" character varying, | |
"hashtagTargetIdOld" character varying, | |
"hashtagTargetGroupIdOld" character varying, | |
"createdAt" timestamp without time zone, | |
"publicationDay" timestamp without time zone, | |
"sharedBy" integer[], | |
"sharedToCommunityIds" integer[], | |
"sharedToCommunityIdsOld" character varying[], | |
"taggedGroups" integer[], | |
"sharedByOld" character varying[], | |
"sourceFilterIds" integer[], | |
flag boolean, | |
score double precision, | |
CONSTRAINT "NewsArticle_pkey" PRIMARY KEY (id) | |
) | |
WITH ( | |
OIDS=FALSE | |
); | |
ALTER TABLE "NewsArticle" | |
OWNER TO postgres; | |
-- Index: "Event_feedId_idx" | |
-- DROP INDEX "Event_feedId_idx"; | |
CREATE INDEX "Event_feedId_idx" | |
ON "NewsArticle" | |
USING btree | |
("feedId"); | |
-- Index: "NewsArticle_createdAt_idx" | |
-- DROP INDEX "NewsArticle_createdAt_idx"; | |
CREATE INDEX "NewsArticle_createdAt_idx" | |
ON "NewsArticle" | |
USING btree | |
("createdAt" DESC); | |
-- Index: "NewsArticle_feedId_idx" | |
-- DROP INDEX "NewsArticle_feedId_idx"; | |
CREATE INDEX "NewsArticle_feedId_idx" | |
ON "NewsArticle" | |
USING btree | |
("feedId"); | |
-- Index: "NewsArticle_groupId_idx" | |
-- DROP INDEX "NewsArticle_groupId_idx"; | |
CREATE INDEX "NewsArticle_groupId_idx" | |
ON "NewsArticle" | |
USING btree | |
("groupId"); | |
-- Index: "NewsArticle_oldId_idx" | |
-- DROP INDEX "NewsArticle_oldId_idx"; | |
CREATE INDEX "NewsArticle_oldId_idx" | |
ON "NewsArticle" | |
USING btree | |
("oldId" COLLATE pg_catalog."default"); | |
-- Index: "NewsArticle_publicationDate_idx" | |
-- DROP INDEX "NewsArticle_publicationDate_idx"; | |
CREATE INDEX "NewsArticle_publicationDate_idx" | |
ON "NewsArticle" | |
USING btree | |
("publicationDate" DESC); | |
-- Index: "NewsArticle_publicationDay_idx" | |
-- DROP INDEX "NewsArticle_publicationDay_idx"; | |
CREATE INDEX "NewsArticle_publicationDay_idx" | |
ON "NewsArticle" | |
USING btree | |
("publicationDay" DESC); | |
-- Index: "NewsArticle_score_idx" | |
-- DROP INDEX "NewsArticle_score_idx"; | |
CREATE INDEX "NewsArticle_score_idx" | |
ON "NewsArticle" | |
USING btree | |
(score); | |
-- Index: "NewsArticle_sharedToIds_idx" | |
-- DROP INDEX "NewsArticle_sharedToIds_idx"; | |
CREATE INDEX "NewsArticle_sharedToIds_idx" | |
ON "NewsArticle" | |
USING btree | |
("sharedToCommunityIds"); | |
-- Index: "NewsArticle_sourceFilterIds_idx" | |
-- DROP INDEX "NewsArticle_sourceFilterIds_idx"; | |
CREATE INDEX "NewsArticle_sourceFilterIds_idx" | |
ON "NewsArticle" | |
USING btree | |
("sourceFilterIds"); | |
-- Index: "NewsArticle_taggedGroups_GIN_idx" | |
-- DROP INDEX "NewsArticle_taggedGroups_GIN_idx"; | |
CREATE INDEX "NewsArticle_taggedGroups_GIN_idx" | |
ON "NewsArticle" | |
USING gin | |
("taggedGroups"); | |
-- Index: "NewsArticle_taggedGroups_idx" | |
-- DROP INDEX "NewsArticle_taggedGroups_idx"; | |
CREATE INDEX "NewsArticle_taggedGroups_idx" | |
ON "NewsArticle" | |
USING btree | |
("taggedGroups"); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Table: "SourceFilter" | |
-- DROP TABLE "SourceFilter"; | |
CREATE TABLE "SourceFilter" | |
( | |
id serial NOT NULL, | |
"oldId" character varying, | |
"groupId" integer, | |
"communityId" integer, | |
keywords character varying[], | |
"groupIdOld" character varying, | |
"communityIdOld" character varying, | |
"createdAt" date, | |
"targetId" integer, | |
"targetType" character varying, | |
CONSTRAINT "SourceFilter_pkey" PRIMARY KEY (id) | |
) | |
WITH ( | |
OIDS=FALSE | |
); | |
ALTER TABLE "SourceFilter" | |
OWNER TO postgres; | |
-- Index: "SourceFilter_communityId_idx" | |
-- DROP INDEX "SourceFilter_communityId_idx"; | |
CREATE INDEX "SourceFilter_communityId_idx" | |
ON "SourceFilter" | |
USING btree | |
("communityId"); | |
-- Index: "SourceFilter_groupId_idx" | |
-- DROP INDEX "SourceFilter_groupId_idx"; | |
CREATE INDEX "SourceFilter_groupId_idx" | |
ON "SourceFilter" | |
USING btree | |
("groupId"); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment