Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guild deletion #16

Closed
nclx opened this issue Jul 26, 2013 · 1 comment
Closed

Guild deletion #16

nclx opened this issue Jul 26, 2013 · 1 comment

Comments

@nclx
Copy link
Contributor

nclx commented Jul 26, 2013

Deleting guild from the table guilds deletes guild_membership, guild_ranks but it doesnt delete guild_invites (didnt test any other and didnt import new schema, is old database "optimized").

@marksamman
Copy link
Member

The schema has a foreign key for guilds.id with ON DELETE CASCADE. It might have been missing initially and as it looks like was never patched by the database updater. The table is currently unused by the server, but will be kept for people to implement guild invitations on their own using the table.

To add the foreign key, execute this query:
ALTER TABLE guild_invites ADD FOREIGN KEY (guild_id) REFERENCES guilds (id) ON DELETE CASCADE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants