mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 13:11:16 -05:00
Fix ride model generation
This commit is contained in:
@@ -662,7 +662,7 @@ Deno.serve(async (req) => {
|
||||
}
|
||||
|
||||
// Create ride models
|
||||
if (entityTypes.includes('ride_models') && includeDependencies && createdCompanies.manufacturer.length > 0) {
|
||||
if (entityTypes.includes('ride_models') && includeDependencies && createdSubmissionItems.manufacturer.length > 0) {
|
||||
for (let i = 0; i < plan.rideModels; i++) {
|
||||
const level = getPopulationLevel(fieldDensity, i);
|
||||
const { data: mfgData } = await supabase.from('companies').select('id').eq('slug', randomItem(createdCompanies.manufacturer)).maybeSingle();
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
-- Drop existing constraint
|
||||
ALTER TABLE public.content_submissions
|
||||
DROP CONSTRAINT IF EXISTS content_submissions_submission_type_check;
|
||||
|
||||
-- Add updated constraint including ride_model
|
||||
ALTER TABLE public.content_submissions
|
||||
ADD CONSTRAINT content_submissions_submission_type_check
|
||||
CHECK (submission_type IN (
|
||||
'park',
|
||||
'ride',
|
||||
'review',
|
||||
'photo',
|
||||
'manufacturer',
|
||||
'operator',
|
||||
'designer',
|
||||
'property_owner',
|
||||
'photo_edit',
|
||||
'photo_delete',
|
||||
'ride_model'
|
||||
));
|
||||
Reference in New Issue
Block a user