Skip to content

Instantly share code, notes, and snippets.

View dmorley's full-sized avatar

David Morley dmorley

View GitHub Profile
ALTER TABLE pods ADD terms text, ADD sslexpire text, ADD uptime_custom text ADD dnssec boolean ADD masterversion text, ADD shortversion text;
ALTER TABLE pods DROP Hgitdate, DROP Hgitref, DROP Hruntime, DROP Hencoding, DROP longversion, DROP ptr, DROP whois, DROP postalcode, DROP connection;
ALTER TABLE pods RENAME COLUMN pingdomurl TO statsurl;
ALTER TABLE pods RENAME COLUMN pingdomlast TO statslast;
ALTER TABLE pods RENAME COLUMN xmpp TO service_xmpp;
ALTER TABLE pods RENAME COLUMN uptimelast7 TO uptime_alltime;
ALTER TABLE pods ALTER COLUMN ipv6 TYPE boolean USING ipv6::boolean;
@jhass
jhass / diaspora_spam.rb
Last active February 14, 2022 09:43
Deletes spam comments, posts and local spam accounts. Place into Diasporas root, edit and run. Don't forget to set necessary environment variables.
#!/usr/bin/env ruby
# List of spam accounts
spam_accounts = %w(spamacc@podA spamacc@podB spamacc@mypod)
# Delete comments even if spammer isn't a local user or spam isn't on a
# local users account.
# And delete posts of users in spam_accounts that aren't local.
always_delete = true
Mysql2::Error: Can't create table 'diaspora_production.#sql-5464_bdd' (errno: 121): ALTER TABLE `aspect_memberships` ADD CONSTRAINT `aspect_memberships_contact_id_fk` FOREIGN KEY (`contact_id`) REFERENCES `contacts`(id) ON DELETE CASCADE