Add store selection to API permissions
- Add store_id and store_name columns to wp_dutchie_api_permissions - Backend: Add /stores endpoint, require store_id when creating permissions - Frontend: Add store selector dropdown to API Permissions form - WordPress plugin v1.3.0: Remove store_id from shortcodes (store is tied to token) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
-- Migration: Add store_id to wp_dutchie_api_permissions
|
||||
-- This allows API tokens to be associated with a specific store
|
||||
|
||||
-- Add store_id column to wp_dutchie_api_permissions
|
||||
ALTER TABLE wp_dutchie_api_permissions
|
||||
ADD COLUMN IF NOT EXISTS store_id INTEGER REFERENCES stores(id);
|
||||
|
||||
-- Add index for faster lookups
|
||||
CREATE INDEX IF NOT EXISTS idx_wp_api_permissions_store_id ON wp_dutchie_api_permissions(store_id);
|
||||
|
||||
-- Add store_name column to return store info without join
|
||||
ALTER TABLE wp_dutchie_api_permissions
|
||||
ADD COLUMN IF NOT EXISTS store_name VARCHAR(255);
|
||||
Reference in New Issue
Block a user