SimonVT/schematic — pull request #10 by geovanisouza92 (2014-08-28 13:06:04+00:00)
Title: Compound primary keys

Hello Simon!

I've a case where I need an compound key in a table, and I saw that, when I add ```@PrimaryKey``` to more than one field on my contract, it generates an invalid SQL, for example:

```sql
CREATE TABLE foo(
_id INTEGER NOT NULL PRIMARY KEY,
second_id INTEGER NOT NULL PRIMARY KEY,
bar TEXT
)
```

When the correct equivalent would be:

```sql
CREATE TABLE foo(
_id INTEGER NOT NULL,
second_id INTEGER NOT NULL,
bar TEXT,
PRIMARY KEY (_id, second_id)
)
```

So, I made this change to use only the second form, what is correct when using only one field or more in the ```PRIMARY KEY ()``` clause.

I think that it is not a common case, but is useful. :)