Skip to content

V2 migrations not run on new instance #92

@ghost

Description

Describe the bug

V2 migrations (altering the appcontent table) is not applied during init-db; migrations table claims it is V2 though.

MariaDB [writefreely]> describe appcontent;
+---------+-------------+------+-----+---------------------+-------+
| Field   | Type        | Null | Key | Default             | Extra |
+---------+-------------+------+-----+---------------------+-------+
| id      | varchar(36) | NO   | PRI | NULL                |       |
| content | mediumtext  | NO   |     | NULL                |       |
| updated | datetime    | NO   |     | current_timestamp() |       |
+---------+-------------+------+-----+---------------------+-------+
MariaDB [writefreely]> select * from appmigrations;
+---------+---------------------+--------+
| version | migrated            | result |
+---------+---------------------+--------+
|       2 | 2019-04-14 20:29:53 |        |
+---------+---------------------+--------+

Steps to reproduce (if necessary)

  1. Create an empty database
  2. Point config to empty database
  3. writefreely -init-db

Expected behavior

V2 migrations were run and appcontent has title and content_type columns.

Application configuration

  • Single mode or Multi-user mode? Multi
  • Database? [mysql/sqlite] mysql
  • Open registration? [yes/no] yes
  • Federation enabled? [yes/no] yes

Version or last commit:
WriteFreely 0.9.0

Workaround

update appmigrations set version=1;

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions