Kitura / Swift-Kuery-ORM

An ORM for Swift, built on Codable
Apache License 2.0
212 stars 30 forks source link

Varchar type ID #99

Open mbmshafraz opened 5 years ago

mbmshafraz commented 5 years ago

Context and Description

I can't create Table with String/Varchar type ID in MySQL database

Environment Details

MySQL on Ubuntu

Steps to Reproduce

Define struct with string type id extend idColumnName, idColumnType call createTableSync() method

Expected vs. Actual Behaviour

AdmiralTriggerHappy commented 4 years ago

This would be nice, having all strings define as Text makes things messy. Would be nice to have a way to define either char, varchar or text depending on requirements. I've been looking through the code but I'm still very new to swift and not sure how things are being mapped out here.