Skip to content
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

Rename selected columns to guarantee correct case #123

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/schemaMysql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class MysqlDatabase implements Database {
params = []
}
const rawEnumRecords = await this.queryAsync(
'SELECT column_name, column_type, data_type ' +
'SELECT column_name as column_name, column_type as column_type, data_type as data_type ' +
'FROM information_schema.columns ' +
`WHERE data_type IN ('enum', 'set') ${enumSchemaWhereClause}`,
params
Expand All @@ -128,7 +128,7 @@ export class MysqlDatabase implements Database {
let tableDefinition: TableDefinition = {}

const tableColumns = await this.queryAsync(
'SELECT column_name, data_type, is_nullable ' +
'SELECT column_name as column_name, data_type as data_type, is_nullable as is_nullable ' +
'FROM information_schema.columns ' +
'WHERE table_name = ? and table_schema = ?',
[tableName, tableSchema]
Expand All @@ -152,7 +152,7 @@ export class MysqlDatabase implements Database {

public async getSchemaTables (schemaName: string): Promise<string[]> {
const schemaTables = await this.queryAsync(
'SELECT table_name ' +
'SELECT table_name as table_name ' +
'FROM information_schema.columns ' +
'WHERE table_schema = ? ' +
'GROUP BY table_name',
Expand Down