Create With Copilot

You can use Copilot chat (if extension installed) to create new databases and projects:

  1. Create a model, eg:
Show Me How to Use Copilot


Paste this into the Copilot prompt:

Use SQLAlchemy to create a sqlite database named sample_ai.sqlite, with customers, orders, items and product

Hints: use autonum keys, allow nulls, Decimal types, foreign keys, no check constraints.

Include a notes field for orders.

Create a few rows of only customer and product data.

Enforce the Check Credit requirement (do not generate check constraints):

1. Customer.Balance <= CreditLimit
2. Customer.Balance = Sum(Order.AmountTotal where date shipped is null)
3. Order.AmountTotal = Sum(Items.Amount)
4. Items.Amount = Quantity * UnitPrice
5. Store the Items.UnitPrice as a copy from Product.UnitPrice


  1. Paste the copilot response into a new file

  2. Create your project:

als create --project-name=sample_ai --db-url=sqlite
  1. This will create your database, create an API Logic Project from it, and launch your IDE.