Problem/Motivation

when creating a Drupal database one of the options is to add a prefix to all tables (for example prefixing 'xxx' results in table name xxx_file_managed). If prefixing is used then, on running import, the error "SQLSTATE[42S02]: Base table or view not found: 1146 Table 'databasename.file_managed' doesn't exist: SELECT file_managed.uri FROM file_managed ORDER BY file_managed.fid DESC limit 1; Array
(
)" is raised

Steps to reproduce

1. create a taxonomy and add terms
2. export a csv of the taxonomy
3. import csv into different database without prefix on tables (no error)
4. repeat step 3 for database with prefix on table in step 3 (error occurs)

Proposed resolution

on the configuration page add a field for prefix, amend SQL to incorporate if used.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

Infoloko created an issue. See original summary.

Infoloko’s picture

Issue summary: View changes
Infoloko’s picture

Issue summary: View changes
nuuou’s picture

Status: Active » Closed (duplicate)
Related issues: +#3017222: Missing database table prefixing

This is a duplicate issue, and the related issue has been re-opened after a previous patch was incorrectly marked as fixed.

You can find a Merge Request in the related issue that should fix this for you, as it properly prefixes a couple database queries!

vuil’s picture