Open amindadgar opened 1 year ago
@amindadgar can you:
1) generate a migration with them 2) share the neo4j migration commands with me
Here's the migration process explained in another issue in past: https://github.com/RnDAO/tc-DAOlytics/issues/226#issuecomment-1660371486
The migration file would be just to create a file named V001__twitter_rules_defining_migration.cypher
(or any other names like it)
the file should contain
CREATE CONSTRAINT user_id_unique IF NOT EXISTS
FOR (a:TwitterAccount) REQUIRE a.userId IS UNIQUE;
CREATE CONSTRAINT tweet_id_unique IF NOT EXISTS
FOR (t:Tweet) REQUIRE t.tweetId IS UNIQUE;
CREATE CONSTRAINT hashtag_unique IF NOT EXISTS
FOR (h:Hashtag) REQUIRE h.hashtag IS UNIQUE;
Note: If the discord and twitter neo4j databases are the same we have to call the file V002__twitter_rules_defining_migration.cypher
, since we have the 001 version previously for defining the discord rules and constraints.
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:
2nd constraint
3rd constraint