Initial commit - Black Canyon Tickets whitelabel platform

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-07-08 12:31:31 -06:00
commit 997c129383
139 changed files with 60476 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
-- Function to handle user signup and create user record
CREATE OR REPLACE FUNCTION handle_auth_signup()
RETURNS TRIGGER AS $$
BEGIN
-- Create user record in users table
INSERT INTO users (id, email, name)
VALUES (NEW.id, NEW.email, NEW.raw_user_meta_data->>'name');
RETURN NEW;
END;
$$ LANGUAGE plpgsql SECURITY DEFINER;
-- Trigger to run the function when a user signs up
CREATE TRIGGER on_auth_user_created
AFTER INSERT ON auth.users
FOR EACH ROW EXECUTE FUNCTION handle_auth_signup();