amilajack / falcon-core-old

The cross-database ORM that powers falcon
MIT License
2 stars 1 forks source link

PR: Uniform Create Table Syntax #29

Closed jooohhn closed 7 years ago

jooohhn commented 7 years ago

Summary

SELECT sql FROM sqlite_master WHERE name='${table}'; returns the sqlite statement used to create table. However, the format/syntax isn't the same for all instances as it is determined by the user/client and sqlite allows multiply different syntaxes for creating tables/columns/constraints.

There should be an adapter/function that takes any sqlite create table statement and returns a consistent format that falcon-core can work with

Example

Editing with db-browser will force an sqlite table's creation statement to look like this, regardless of initial format/syntax

image