summaryrefslogtreecommitdiffstats
path: root/server/migrations
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-04-03 20:04:57 -0400
committerDessalines <tyhou13@gmx.com>2020-04-03 20:04:57 -0400
commit85ea1046f060694bec545c7897c5da9ecda412ef (patch)
tree9937c4b672fbc5e7013e5b5d729106d168aec00b /server/migrations
parentcb7059f832749836f865e2fcb90b089d949b8487 (diff)
Adding post and comment ap_id columns.
Diffstat (limited to 'server/migrations')
-rw-r--r--server/migrations/2020-04-03-194936_add_activitypub_for_posts_and_comments/down.sql7
-rw-r--r--server/migrations/2020-04-03-194936_add_activitypub_for_posts_and_comments/up.sql14
2 files changed, 21 insertions, 0 deletions
diff --git a/server/migrations/2020-04-03-194936_add_activitypub_for_posts_and_comments/down.sql b/server/migrations/2020-04-03-194936_add_activitypub_for_posts_and_comments/down.sql
new file mode 100644
index 00000000..50c95bb2
--- /dev/null
+++ b/server/migrations/2020-04-03-194936_add_activitypub_for_posts_and_comments/down.sql
@@ -0,0 +1,7 @@
+alter table post
+drop column ap_id,
+drop column local;
+
+alter table comment
+drop column ap_id,
+drop column local;
diff --git a/server/migrations/2020-04-03-194936_add_activitypub_for_posts_and_comments/up.sql b/server/migrations/2020-04-03-194936_add_activitypub_for_posts_and_comments/up.sql
new file mode 100644
index 00000000..a3fb9562
--- /dev/null
+++ b/server/migrations/2020-04-03-194936_add_activitypub_for_posts_and_comments/up.sql
@@ -0,0 +1,14 @@
+-- Add federation columns to post, comment
+
+alter table post
+-- TODO uniqueness constraints should be added on these 3 columns later
+add column ap_id character varying(255) not null default 'changeme', -- This needs to be checked and updated in code, building from the site url if local
+add column local boolean not null default true
+;
+
+alter table comment
+-- TODO uniqueness constraints should be added on these 3 columns later
+add column ap_id character varying(255) not null default 'changeme', -- This needs to be checked and updated in code, building from the site url if local
+add column local boolean not null default true
+;
+