Kamil Trzciński
fb07863693
Rewind IID on Ci::Pipelines
...
If no pipeline is created we currently have IID gap.
This is due to fact that we generate IID not on save,
but rather ahead of time. This results, us,
losing IIDs.
2019-04-16 11:22:23 +02:00
Nick Thomas
013f7cd24c
Inherit from ApplicationRecord instead of ActiveRecord::Base
2019-03-28 16:18:23 +00:00
Jacopo
c6bddeacf4
Updates code using class_methods over module ClassMethods
2018-08-29 16:56:34 +02:00
gfyoung
15b878e27e
Enable more frozen string in app/models/**/*.rb
...
Partially addresses #47424 .
2018-08-07 00:37:36 -07:00
Jamie Schembri
e72388246b
Resolve "Allow issue's Internal ID (iid
) to be set when creating via the API"
2018-08-01 09:03:14 +00:00
Andreas Brandl
90778e5d27
Require has_internal_id to pass a init block.
...
This is useful since the current scheme allows us to freely delete any
records in internal_ids. If the record is not there, it will get rebuild
using the init block.
We require passing in 'init for the time being and as long as its
not expensive to do so. This makes the scheme a bit more robust.
If at some point, this is expensive - we may choose to make this
optional while losing the ability to recalculate the value on the fly.
Closes #49609 .
2018-07-30 11:51:43 +02:00
Shinya Maeda
910a7d02a8
Remove numericality as it's redandant with integer column and validates nil IID
2018-05-11 15:34:36 +09:00
Shinya Maeda
6a108b8fbd
Fix ensure_iid! method override problem
2018-05-10 16:22:43 +09:00
Shinya Maeda
0af2ab18fa
Decouple to_params from AtomicInternalId concern
2018-05-08 14:57:41 +09:00
Kamil Trzciński
58f229af99
Make Atomic Internal ID work for pipelines
2018-05-03 10:49:13 +02:00
Andreas Brandl
9ea2fc85a3
Atomic internal ids for all models
2018-04-20 14:00:15 +00:00
Andreas Brandl
e7393191ee
Replace public_send calls.
2018-03-18 17:06:13 +01:00
Andreas Brandl
fb6d6fce5a
Address review comments.
2018-03-16 13:35:27 +01:00
Andreas Brandl
bc3fc8ec3e
Only support single scope argument.
...
We can extend this later, but for now we don't have the use case.
2018-03-16 13:35:27 +01:00
Andreas Brandl
539bdf73be
Address review comments.
2018-03-16 13:35:27 +01:00
Andreas Brandl
6568b4a98e
Add shared specs for AtomicInternalId concern.
2018-03-16 13:35:26 +01:00
Andreas Brandl
3fa2eb4e10
Refactor, extract class and improve comments.
2018-03-16 13:35:25 +01:00
Andreas Brandl
0360b0928a
More flexible way of internal id generation.
2018-03-16 13:35:25 +01:00
Andreas Brandl
754272e392
Atomic generation of internal ids for issues.
2018-03-16 13:35:25 +01:00