mirror of
https://github.com/strapi/strapi.git
synced 2025-11-15 01:28:07 +00:00
Add JSON support for SQLite
This commit is contained in:
parent
7b6558884e
commit
b1f063abe0
@ -134,7 +134,7 @@ module.exports = function(strapi) {
|
|||||||
try {
|
try {
|
||||||
// External function to map key that has been updated with `columnName`
|
// External function to map key that has been updated with `columnName`
|
||||||
const mapper = (params = {}) => {
|
const mapper = (params = {}) => {
|
||||||
if (definition.client === 'mysql') {
|
if (definition.client === 'mysql' || definition.client === 'sqlite3') {
|
||||||
Object.keys(params).map((key) => {
|
Object.keys(params).map((key) => {
|
||||||
const attr = definition.attributes[key] || {};
|
const attr = definition.attributes[key] || {};
|
||||||
|
|
||||||
@ -295,7 +295,7 @@ module.exports = function(strapi) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Convert to JSON format stringify json for mysql database
|
// Convert to JSON format stringify json for mysql database
|
||||||
if (definition.client === 'mysql') {
|
if (definition.client === 'mysql' || definition.client === 'sqlite3') {
|
||||||
const events = [{
|
const events = [{
|
||||||
name: 'saved',
|
name: 'saved',
|
||||||
target: 'afterSave'
|
target: 'afterSave'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user