Skip to content

Neo4j DB Migration: Twitter database  #59

@amindadgar

Description

@amindadgar

In order to have the twitter neo4j database more consistent we need to define some rules in the database which we could have them using a database migration. Here's the queries for migration

  • 1st constraint:
CREATE CONSTRAINT user_id_unique IF NOT EXISTS
FOR (a:TwitterAccount) REQUIRE a.userId IS UNIQUE;
  • 2nd constraint
CREATE CONSTRAINT tweet_id_unique IF NOT EXISTS
FOR (t:Tweet) REQUIRE t.tweetId IS UNIQUE;
  • 3rd constraint
CREATE CONSTRAINT hashtag_unique IF NOT EXISTS
FOR (h:Hashtag) REQUIRE h.hashtag IS UNIQUE;

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions