mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
be8e13df64
Summary: Documents can now be flagged as tutorials, which causes them to display Markdown-formatted slides from a special GristDocTutorial table. Tutorial documents are forked on open, and remember the last slide a user was on. They can be restarted too, which prepares a new fork of the tutorial. Test Plan: Browser tests. Reviewers: jarek Reviewed By: jarek Differential Revision: https://phab.getgrist.com/D3813
22 lines
806 B
TypeScript
22 lines
806 B
TypeScript
import {MigrationInterface, QueryRunner, TableIndex} from "typeorm";
|
|
|
|
export class ForkIndexes1678737195050 implements MigrationInterface {
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
// HomeDBManager._onFork() references created_by in the ON clause.
|
|
await queryRunner.createIndex("docs", new TableIndex({
|
|
name: "docs__created_by",
|
|
columnNames: ["created_by"]
|
|
}));
|
|
// HomeDBManager.getDocForks() references trunk_id in the WHERE clause.
|
|
await queryRunner.createIndex("docs", new TableIndex({
|
|
name: "docs__trunk_id",
|
|
columnNames: ["trunk_id"]
|
|
}));
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.dropIndex("docs", "docs__created_by");
|
|
await queryRunner.dropIndex("docs", "docs__trunk_id");
|
|
}
|
|
}
|