title: generate DDL script from SQL Server database
body: <p>How to generate DDL (with Foreign keys, indexes, etc.) script of all tables from SQL Server database using SQL (select/stored procedure/etc.)? i need everything except the data.</p>
  
  <p>I <strong>can't</strong> use Sql Server Management Studio because i want to use it in a node.js script that will run over linux!</p>