Commit Graph

9 Commits

Author SHA1 Message Date
Jan Provaznik 0fc9f9d3e7 Add version 4.2 to all existing migrations
DB schema generated by a migration may look different in
rails 4 and 5 (because rails 5 may use different default values).
For this reason it's important to explicitly set for which rails
version a migration was written for.

See https://stackoverflow.com/questions/35929869/activerecordmigration-deprecation-warning-asks-for-rails-version-but-im-no/35930912#35930912
2018-11-22 13:18:28 +01:00
Dmitriy Zaporozhets 9ab3e6093c
Add mysql_compatible_index_length to migration helpers
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2018-09-21 13:23:29 +03:00
Alexis Reigel 4e53131f7d add unique index for gpg_signatures#commit_sha 2017-07-27 15:46:04 +02:00
Alexis Reigel c4c44c6a1b length constrain on the index, not on the column
we actually don't need a limit on the column itself for MySQL to work.
we need to set a length on the index.
2017-07-27 15:46:03 +02:00
Alexis Reigel 57ccff8ea4 use db's on_delete instead of has_many :dependent 2017-07-27 15:46:03 +02:00
Alexis Reigel 895efdfbcf use text instead of string for db columns 2017-07-27 15:46:03 +02:00
Alexis Reigel 8e0c33ed13 use ShaAttribute for gpg table columns 2017-07-27 15:46:03 +02:00
Alexis Reigel 8c8a9e6d3f merge migrations to 1 single create per table
also:

* reorder table columns
* no need for `add_concurrent_index`
* no need for explicit index removal on `#down`
2017-07-27 15:46:03 +02:00
Alexis Reigel 8236b12dff gpg signature model for gpg verification caching 2017-07-27 15:42:53 +02:00