Fork me on GitHub
Subscribe 3

Ticket #695 (fixed enhancement)

Create default tables (migrations)

  • Created: 2012-07-07 19:46:49
  • Reported by: Franz
  • Assigned to: Franz
  • Milestone: 2.0-alpha1
  • Component: installation
  • Priority: high

Laravel has this handy migrations feature, that we can probably use in our install script.

First, though, we need to create the migrations, which can be based directly on the current install script.


AlexCogn 2012-07-08 23:44:04

Why migrations? Why not using the Schema Builder for running those queries one time only? The installation script can be deleted afterwards

Franz 2012-07-09 09:39:14

Well, the migrations make use of the schema script. I just think using migrations makes it easier to run them.

Franz 2012-07-09 13:18:48

Commit 12955dc to core master

#695: Create migration classes for the default tables.

Franz 2012-07-09 14:31:10

Commit 40a4caf to core master

#695: Adding default values to table schemas in migrations. Because I can (just noticed that).

Franz 2012-08-25 22:01:25

One more benefit: The bundle itself can be installed by running the migrations from the command line if the installer bundle isn't installed.

Franz 2012-08-26 22:38:34

Commit 7537544 to core master

#695: Fix index definition for posts migration.

Franz 2012-08-26 23:09:42

Commit c3065b8 to core master

#695: Make many integers in migrations UNSIGNED.

Franz 2012-08-26 23:42:36

Commit 51d0060 to core master

#695: Move installation migrations to their own subfolder.

Franz 2012-08-26 23:52:26

Commit a609dcc to core master

#695: No default value for category name.

Franz 2012-08-27 10:16:29

Commit 2d0ca54 to core master

#695: Clean up the forum migration.

Franz 2012-08-27 10:22:04

Commit 2cc53ef to core master

#695: Clean up the post migration.

Franz 2012-08-27 10:38:55

Commit e4c3450 to core master

#695: Clean up the users migration.

Franz 2012-08-27 10:44:35

Commit 3b4f3fe to core master

#695: Actually, use integers for smallint columns.

That takes away a little more space in the database, but I'm willing to sacrifice that in order to prevent possible bugs in the future, introduced by someone who thinks Laravel's "boolean" needs to be a true boolean. It isn't right now, but it still looks confusing in the migration file.

Franz 2012-08-27 11:45:44

Commit bc14f4e to core master

#695: No database defaults for user language and style.

Franz 2012-08-27 11:48:33

Commit 4fbf13f to core master

#695: Rename migration files for tables with underscores.

Franz 2012-08-27 14:26:48

All done for the current version, I think.

For all future changes to the database structure, the migrations in bundles/fluxbb/core/migrations/install/ have to be updated.

Also, a migration will have to be added to the corresponding version's folder in bundles/fluxbb/core/migrations/update/.

Franz 2012-08-27 14:52:39

Commit e5a78ff to core master

#695: Change length of session ID column.

Franz 2012-08-27 14:56:10

Commit 42a86ea to core master

Create a simple CLI task for installing FluxBB database tables.

Related to #695 and #703.

Franz 2012-09-17 21:50:29

  • Status changed from open to fixed.

Franz 2012-09-19 12:38:02

  • Status changed from fixed to open.

I have to review some stuff here so that we can start with a clean slate.

2.0-alpha versions will not support upgrading from 1.x at all, they will just have to be fresh installs.

Thus, I can do some big changes to the structure right now without caring so much about updating.

See ticket #390.

Franz 2012-12-02 18:23:55

Commit c513110 to fluxbb2 master

#695: Update migrations.

Franz 2012-12-03 00:24:33

  • Status changed from open to fixed.

Done for now.