-
-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I need an option to stop the default "id" column being created on new tables #19
Comments
The reason this is done is because we cannot create a table without columns. As an alternative, we could implement a lazy table creation scheme where the table is only created as "ensure_columns" is first called, not upon database.get_table. Still, would you agree that |
Opt-out is good with me. I can see why it would be useful for newbies to have an automatic "id" column (even if it is just a copy of the "rowid" column they'd get anyway). |
+1 on this issue. I just spent an hour slamming my head against the wall. what if you just named the default primary key |
I vote for the "opt-out" or designate the name of primary key column user desired |
I like the opt-out approach best, too. Would you want to submit a pull request? |
OK. Let me read your codebase first. On Tuesday, September 3, 2013 at 11:17 AM, Friedrich Lindenberg wrote:
|
I'm dumping some data into a database. It's my first time using dataset. I try this…
And I get an exception…
It took me a while to work out that my
id
column was conflicting with theid INTEGER PRIMARY KEY
created by dataset when the table was made.I'm not sure whether the
id
is being created out of necessity (because you can't create a table with no columns) or out of design (because most of your users want an auto-incrementingid
column and the defaultrowid
is too obscure?).Either way, it's a shame you do, because it meant there was seemingly no way for me to use dataset in this particular project. I ended up using Dumptruck which I'd really rather not do.
Are there plans to allow creation of a table without the automatic
id INTEGER PRIMARY KEY
column?The text was updated successfully, but these errors were encountered: