Follow-up: investigate whether we should convert namespace_onboarding_actions table
From: !49010 (comment 460541770)
Instead of a record for each action
and namespace_id
combination, create one record per namespace and one column for each action.
So instead of the current implementation:
namepace_id | action |
---|---|
117 | 1 |
117 | 2 |
convert it to:
namepace_id | action_1 | action_2 |
---|---|---|
117 | '2020-12-16 20:22:30' | '2020-12-16 20:22:42' |
This makes it possible to query namespaces for which a record exists, instead of checking for namespaces that have been created within 90 days. This would allow us to convert the logic in the OnboardingProgressService
to (from here):
def execute(step:)
Namespaces::Onboarding.find_by(namespace: namespace.root_ancestor).try do |onboarding|
onboarding.complete_step(step)
end
end