feat: manage files via manifestattachment with auth and cascade trigger, format API.md method signatures
This commit is contained in:
@@ -32,7 +32,7 @@ function parseSchema(source) {
|
||||
const trimmed = line.trim().replace(/,$/, '');
|
||||
if (!trimmed || trimmed.startsWith('CONSTRAINT')) {
|
||||
const fkMatch = trimmed.match(
|
||||
/CONSTRAINT\s+(\w+)\s+FOREIGN KEY\s*\(([^)]+)\)\s+REFERENCES\s+(\w+)\(([^)]+)\)(?:\s+ON DELETE\s+(.+))?/i
|
||||
/CONSTRAINT\s+(\w+)\s+FOREIGN KEY\s*\(([^)]+)\)\s+REFERENCES\s+\[?(\w+)\]?\(([^)]+)\)(?:\s+ON DELETE\s+(.+))?/i
|
||||
);
|
||||
if (fkMatch) {
|
||||
const constraintName = fkMatch[1];
|
||||
@@ -105,7 +105,7 @@ function parseSchema(source) {
|
||||
}
|
||||
|
||||
const alterFkRegex =
|
||||
/ALTER TABLE\s+(\w+)\s+ADD CONSTRAINT\s+(\w+)\s+FOREIGN KEY\s*\(([^)]+)\)\s+REFERENCES\s+(\w+)\(([^)]+)\)(?:\s+ON DELETE\s+([\w\s]+?))?\s*;/gi;
|
||||
/ALTER TABLE\s+(\w+)\s+ADD CONSTRAINT\s+(\w+)\s+FOREIGN KEY\s*\(([^)]+)\)\s+REFERENCES\s+\[?(\w+)\]?\(([^)]+)\)(?:\s+ON DELETE\s+([\w\s]+?))?\s*;/gi;
|
||||
let alterMatch;
|
||||
|
||||
while ((alterMatch = alterFkRegex.exec(sqlBlock)) !== null) {
|
||||
@@ -361,12 +361,12 @@ const CLUSTERS = [
|
||||
{
|
||||
id: 'media',
|
||||
label: 'Media',
|
||||
tables: ['pic', 'articlepic', 'categorypic', 'brandpic'],
|
||||
tables: ['pic', 'articlepic', 'categorypic', 'brandpic', 'file'],
|
||||
},
|
||||
{
|
||||
id: 'manifests',
|
||||
label: 'Documents',
|
||||
tables: ['manifest', 'manifestarticle', 'ledger'],
|
||||
tables: ['manifest', 'manifestarticle', 'manifestattachment', 'ledger'],
|
||||
},
|
||||
{
|
||||
id: 'commerce',
|
||||
|
||||
Reference in New Issue
Block a user