Fork me on GitHub
Subscribe 2

Ticket #762 (fixed enhancement)

add_field suggestion for SQLite

  • Created: 2012-11-06 22:16:34
  • Reported by: Koos
  • Assigned to: Franz
  • Milestone: 1.5.1
  • Component: database
  • Priority: normal

When using add_field in SQLite, field is currently added to the very beginning of table when $after_field is not specified. When $after_field is specified, field is added before $after_field instead of after $after_field.

I also think it's unnecessary for the array_insert() function to appear in include/functions.php. It only gets used in SQLite dblayer, and I can't see it ever being used anywhere else.

See patch for my suggestion.

History

Koos 2012-11-06 22:17:53

  • Uploaded patch koos.patch. (view)

Franz 2012-11-06 23:27:23

  • Milestone set to 1.5.1.

Thanks for the patch.

I think you forgot to re-add the array_insert() method again in the other file, but I get the idea.

While we're at it: I think we should leave the function in functions.php, in case it's used by any mods or custom code.

Koos 2012-11-07 21:48:44

Franz wrote:

I think you forgot to re-add the array_insert() method again in the other file, but I get the idea.

Actually not, I removed it on purpose. I think it's unlikely that there are any mods making use of that function, but if there are, they can always update it.

Comment edited 1 times (Diff)

Franz 2012-11-12 23:35:39

  • Owner set to Franz.

Franz 2012-11-13 00:22:10

Commit 5e25c88 to fluxbb master

#762: Fix SQLite's add_field() function messing up the order of fields.

Franz 2012-11-13 00:25:47

  • Status changed from open to fixed.

Fixed, thank you.

I kept the function, though. Just in case.
(Sorry, I forgot to mention you in the commit message. Added a comment to the commit.)