From 8802dd24ecf17fa90b3e0200a05224297fa0f462 Mon Sep 17 00:00:00 2001 From: Nick Thomas Date: Wed, 19 Jun 2019 14:10:07 +0100 Subject: Update the docs to reflect lack of MySQL support Now MySQL is no longer supported, we need to change the docs --- doc/development/swapping_tables.md | 8 -------- 1 file changed, 8 deletions(-) (limited to 'doc/development/swapping_tables.md') diff --git a/doc/development/swapping_tables.md b/doc/development/swapping_tables.md index 29cd6a43aff..5c62900dbff 100644 --- a/doc/development/swapping_tables.md +++ b/doc/development/swapping_tables.md @@ -39,14 +39,6 @@ PostgreSQL you can use the `reset_pk_sequence!` method like so: reset_pk_sequence!('events') ``` -For MySQL however you need to do run the following: - -```ruby -amount = Event.pluck('COALESCE(MAX(id), 1)').first - -execute "ALTER TABLE events AUTO_INCREMENT = #{amount}" -``` - Failure to reset the primary keys will result in newly created rows starting with an ID value of 1. Depending on the existing data this can then lead to duplicate key constraints from popping up, preventing users from creating new -- cgit v1.2.3