mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-07 10:38:54 +08:00
Pivot implementation and redesign (#69)
- Pivot support implementation - Rename queries into inquiries - Rename editor into workspace - Change result set format - New JSON format for inquiries - Redesign panels
This commit is contained in:
42
tests/lib/storedInquiries/_migrations.spec.js
Normal file
42
tests/lib/storedInquiries/_migrations.spec.js
Normal file
@@ -0,0 +1,42 @@
|
||||
import { expect } from 'chai'
|
||||
import migrations from '@/lib/storedInquiries/_migrations'
|
||||
|
||||
describe('_migrations.js', () => {
|
||||
it('migrates from version 1 to the current', () => {
|
||||
const oldInquiries = [
|
||||
{
|
||||
id: '123',
|
||||
name: 'foo',
|
||||
query: 'SELECT * FROM foo',
|
||||
chart: { here_are: 'foo chart settings' },
|
||||
createdAt: '2021-05-06T11:05:50.877Z'
|
||||
},
|
||||
{
|
||||
id: '456',
|
||||
name: 'bar',
|
||||
query: 'SELECT * FROM bar',
|
||||
chart: { here_are: 'bar chart settings' },
|
||||
createdAt: '2021-05-07T11:05:50.877Z'
|
||||
}
|
||||
]
|
||||
|
||||
expect(migrations._migrate(1, oldInquiries)).to.eql([
|
||||
{
|
||||
id: '123',
|
||||
name: 'foo',
|
||||
query: 'SELECT * FROM foo',
|
||||
viewType: 'chart',
|
||||
viewOptions: { here_are: 'foo chart settings' },
|
||||
createdAt: '2021-05-06T11:05:50.877Z'
|
||||
},
|
||||
{
|
||||
id: '456',
|
||||
name: 'bar',
|
||||
query: 'SELECT * FROM bar',
|
||||
viewType: 'chart',
|
||||
viewOptions: { here_are: 'bar chart settings' },
|
||||
createdAt: '2021-05-07T11:05:50.877Z'
|
||||
}
|
||||
])
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user