Do we have a macro to generate DDLs in separate file per table

I am looking for an option to generate one DDL script file per table. I see that we have an option while doing generate database. But for some reason it is giving statement only under PostSQL as we do run some macros before we really generate DDLs. 

Parents
  • Here is simple macro to generate a sql script. 

    Const SINGLE_FILE As Integer = 1
    Const ODBC As Integer = 2
    Const DIRECT_CONNECTION As Integer = 3
    Const MULTIPLE_FILES As Integer = 4
    
    
    Sub Main
    
        Dim theDiagram As Diagram
        Dim theModel As Model
        Dim theDDLGenerator As DDLGeneration
    
        Set theDiagram = DiagramManager.ActiveDiagram
        Set theModel = theDiagram.ActiveModel
        Set theDDLGenerator = theModel.DDLGenerationObject
    
        theDDLGenerator.GenerateDatabaseMethod = MULTIPLE_FILES
        theDDLGenerator.GenerateAllEntities
        theDDLGenerator.CreationScriptFilePath = "C:\demo"
        theDDLGenerator.GenerateDDL
    
        MsgBox "Done"
    
    End Sub
    
    

Reply Children
No Data