I have a moonscript file like the following:
import Model from require "lapis.db.model"
import create_table, types from require "lapis.db.schema"
create_table "invite_codes", {
{ "id", types.serial }
"PRIMARY KEY (id)"
}
class InviteCodes extends Model
@primary_key: "id"
return {
:InviteCodes
}
and i get the following:
SQL: CREATE TABLE "invite_codes" (
"id" nil,
PRIMARY KEY (id)
)
now, I have two questions, is this normal? am I misusing this? and, isn't it meant to be CREATE TABLE "invite_codes" IF NOT EXISTS instead?