Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [database]

The tag has no usage guidance.

0
votes
0answers
10 views

Log is full of “SAVEPOINT LEVELx does not exist”

in the logs of two of our customers who are running on Craft 3.0.41.1 I see a lot of the following error messages: [warning][craft\db\mysql\Schema::releaseSavepoint] Tried to release a savepoint, but ...
1
vote
1answer
21 views

Can't login after restoring production DB locally

I'm attempting to restore a postgres DB backup on to my local dev environment but I encounter an error when trying to login as the admin user (the salient parts being): SQLSTATE[23502]: Not null ...
1
vote
1answer
33 views

How do I import database using the CMS Craft 3

We have previously used the Schematic plugin for database import inside a Docker container for a Python script. This is the command used for the importing, $/data/craft/craft schematic/export --file=...
1
vote
1answer
49 views

Install Failed - Numerous Errors when running with pgsql

Getting Numerous errors when trying to test a staging environment with Craft 3.1. States Install Failed - Check Logs which I have and I'm seeing the following logs being given. I don't understand what'...
1
vote
1answer
64 views

What is CDbException Error: SQLSTATE[42000]: Syntax error or access violation while moving a site to remote?

CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #28 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'site....
1
vote
1answer
32 views

MySQL “Access denied for user” after moving to new server

I've moved my Craft 3 installation to a new server. When connecting to the original database, everything works fine. However, when trying to connect to a new MySQL database (I've tried hosting this ...
2
votes
0answers
47 views

Diagnosing Slow Database Connection for Entries (Frontend and Craft Admin)

We have set up a remote database connection for Craft CMS so that I and my colleague can work on the same database locally. The connect seems very slow both front end and in the admin area. ...
1
vote
1answer
56 views

Setting Up Multiple Sites

I've tried following the guide for setting up multiple sites (https://docs.craftcms.com/v3/sites.html#creating-a-site) but I think i'm missing something. Firstly the craft install on your beta site, ...
2
votes
2answers
136 views

“Craft CMS does not support backtracking to this version. Please upload Craft CMS 0 or later.”

I have a problem related this and this question. I began updating a long time ago (2017?) and got the error "Craft CMS does not support backtracking to this version. Please upload Craft CMS 0 or later"...
1
vote
1answer
36 views

Craft 2, MySQL database, Twig, JavaScript files

I have created in Craft 2 CMS, under the profile of users (ex. parents), new tab for (children), where parents can fill in there children information. The data is saved in a database under the ...
1
vote
1answer
42 views

Craft CMS 3 Content Mover

My database was corrupted after updating to 3.1.0 and no backup. Is there any script to move fields, sections and other staff to new fresh database? Update I found something like this scripts, but ...
1
vote
2answers
61 views

Unable to access site after importing DB

I am installing a repo locally, and everything runs smoothly and I am able to see the site and login to my admin. But when I import my DB then visit my site: I get the error message "Site unavailable"....
1
vote
1answer
113 views

How to connect to a Remote DB using CraftCMS 3.1+

I tried using Andrew Welch's craft-connect plugin, but the plugin was throwing an error on the REMOTE_DB_SERVER variable. I commented the variable out in the .env file, but I still could not connect. ...
1
vote
1answer
26 views

Connect to an external database from a Craft 2.x plugin

I recently saw a very helpful post about how to connect to an external database from a Craft plugin and I wanted to confirm I understood the implementation correctly. On this response the author ...
1
vote
2answers
113 views

Import database backup when using docker

I am trying to import a database backup into a craft instance running on Docker, but none of the fields or content from the latest backup are importing. Here are the steps I took I used these ...
1
vote
2answers
86 views

Accessing Multiple Databases in Craft

Is there a way to access another database outside of the one Craft uses for its content? I need to able to access data fields from an external source for a project I'm working on.
1
vote
2answers
47 views

How do I update a Craft website without losing data?

I have an existing website built with Craft CMS. I made a few changes locally and now I want to update the 'live' website. The problem is that I added a couple of fields and sections but I can't just ...
1
vote
1answer
138 views

Working locally after cloning Craft 3 from Hyperlane

I'm trying out the recommended Hyperlane hosting with Craft CMS. After installing on Hyperlane, I then clone the repo on to my local machine and run 'composer install'. That runs fine, and I create a ....
0
votes
1answer
51 views

Does Craft ActiveRecord require any special table column (dateUpdated, dateCreated,…)?

I have a custom data table PA in the Craft database. I create a craft\db\ActiveRecord model and I want load() and save() data to it. The result will be custom GridView table with CRUD in front end ...
1
vote
2answers
24 views

Counting section handle in TWIG with weighted search plugin

I am using the weighted search plugin to inplement a search functionality in my site. It works as it should but I am looking for a way to tell how much results were found of each type. Where type for ...
1
vote
1answer
50 views

Advanced sorting of events with database expressions (Solspace Calendar)

I want to do some complicated sorting of events coming back from the Solspace Calendar plugin. I'm not certain whether this issue is specific to this plugin or whether it's a general Craft thing. In ...
0
votes
0answers
124 views

Setting up Craft 3 database backup command for a remote database server

I have my Craft 3 database on a separate server than my Craft webserver (load balancing) and when I use the download database backup function in Craft 3, it doesn't know where to look. I haven't ...
2
votes
1answer
64 views

Showing entries for light switch [duplicate]

So I have three light switches on my blog: 'featured', 'required reading' and 'skills'. I got the featured section to work with this code: {% for entry in craft.entries .section(['etiquette', '...
3
votes
1answer
88 views

Craft version number in database?

My provider upgraded to PHP7 and deleted all files outside of the public folder, where I had the system files (...). Is it possible to find out from the database which version (of Craft 2) I need to ...
1
vote
1answer
263 views

Craft 3 cannot find mysqldump command, console works

I want to use Feed Me with Craft to import my old database, but neither Feed Me nor Craft can find mysqldump. I know this is a known problem, and I have successfully added the path to $PATH and ...
1
vote
1answer
231 views

Randomly getting the “Integrity constraint violation” sql error on saving entry

Randomly getting the "Integrity constraint violation" sql error on saving entry from backend. There no apparent cause of this at least not that I can see, because the same post saves without errors ...
1
vote
0answers
75 views

Cannot add more fields - SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large

I've been bumping into a field limit when attempting to mirgrate fields in, which is a massive limitation for the way the site was originally set up. I've read a bunch of other threads where it's ...
2
votes
1answer
38 views

Managing sections and field updates between environments

What is the best practice for the following: Client site running CraftCMS (v3) is in production. Updates are needed which require additions or modifications to the data structure / schema of the site ...
1
vote
0answers
151 views

Craft 3 : Can't backup database (“failed with exit code -1”)

I can't backup database, the log says : [error][yii\base\Exception] yii\base\Exception: Could not create backup: The shell command "mysqldump {{...blablabla...}} failed with exit code -1. in /...
1
vote
1answer
270 views

Problem connecting to MySQL db on installing Craft 3

Having installed Craft 3 using Composer, I'm attempting to run the Craft setup. Everytime I try, I get the following error: Testing database credentials... failed: SQLSTATE[HY000] [1044] Access ...
3
votes
1answer
112 views

Where are tags stored in the database?

Seeing as there currently isn't a way of deleting / managing tags in Craft3, I was wondering if someone could point me to where in the database these tags are stored so I can delete them manually. ...
1
vote
1answer
186 views

how to create a new table in database

I followed the document to create a migration, add a schema version, install migration and add schema codes into Install.php. Last I run the migrate up command, but no table is created. Anyone could ...
0
votes
0answers
175 views

Craft 2 Query Builder from SQL Help

I am trying to convert a plain SQL query I have into query builder. I am getting close, both subqueries seem to be working independently in the query builder syntax but I am struggling to get the ...
1
vote
1answer
79 views

Save out Backup Database to local file

I've inherited a Craft 2 site to do maintenance. I don't yet have access to production server. I need to grab the production server DB to run locally on my machine. When I click "Backup Database" from ...
0
votes
1answer
211 views

How many users can Craft handle?

I'm looking to use a Craft3 installation as a bridge app to synch a client's contacts from their CRM server to their Email Service Provider, via respective APIs. I'll be storing their contacts as ...
1
vote
1answer
135 views

Database Exception with Sprout Forms after updating to Craft 3

I've recently updated a site from Craft 2 to 3. I'm getting this error after login in to the admin regarding Sprout Forms which was installed in my Craft 2 install. What can I do to get the back-end ...
1
vote
1answer
303 views

Craft 3 Database Backup

Why do I have to activate the PHP functions: "proc_open" and "proc_close" to backup the database? I got the error logs: [error][yii\base\Exception] yii\base\Exception: Could not create backup: ...
2
votes
2answers
661 views

Craft 3 update failure

i wanted update a new installed craft3 and got this message: I took a look in the web.log file. The first line from today gives an error: 2018-04-25 03:39:23 [85.7.133.198][-][-][error][yii\base\...
3
votes
1answer
694 views

Craft 3: Get Data from a custom Table via createCommand()

In Craft 2 you could creat a query with: craft()->db->createCommand()->select() .... etc. But in Craft 3 there is no select() Method in Craft::$app->db->createCommand(). Am I ...
1
vote
1answer
258 views

Back-up doesn't work in Craft CMS 3 on MAMP locally

I installed Craft CMS 3.0.1 locally on MAMP (Apache/PHP7.0.22), but when I want to do a backup of the database it says: "There was a problem backing up your database. Please check the Craft logs. Back-...
1
vote
1answer
59 views

Best way to handle large amount of records

What is the best way to handle 20,000 simple records? The records need to be searchable and linked to categories. What is the best way to handle so many records when each records or entry would be a ...
2
votes
1answer
125 views

How to transfer Craft configuration changes separate from web conent

I am busy reworking a reasonably large website that is already in Craft. The production site is updated with new content several times a day. My current work is an interface redesign. I have a local ...
2
votes
1answer
768 views

Craft 3 : What are the advantages to use PostgreSQL and when should I use it instead of MySQL?

Craft 3 now supports PostgreSQL. I know this a very general question, but: I have absolutely no experience with PostgreSQL I don't know when should I use it instead of MySQL To quote Bob Olde ...
1
vote
2answers
245 views

Craft 3 wont update in Laravel Valet development enviornment

I'm using Laravel Valet with Craft 3 (Craft 3.0.0-RC13) and Sequel Pro. I can't seem to get Craft to update. I just get a warning sign and a message saying that it couldn't back up the database. ...
1
vote
1answer
126 views

How are parent and child categories related in Craft database?

I am writing an API which directly connects to Craft database and retrieves data. I need to get the categories hierarchy. But I can not find how parent and child categories are related in the ...
1
vote
1answer
750 views

Relational query get error “Getting unknown property”

I built up a plugin and inside the plugin I created the relation between Entry and Section using ActiveRecord, like below: In SectionRecord : class SectionRecord extends ActiveRecord { public ...
0
votes
1answer
106 views

What is the table `templatecachequeries` for?

What is the content of templatecachequeries table for in Craft 3? Especially the column query? And is it normal to have a lot of entries (+5000) even on a smaller medium sized page? Or it is because ...
1
vote
0answers
120 views

In upgrading from Craft 2 to Craft 3 I'm getting a SQL error saying the translationMethod column is missing [closed]

The full message is: Internal Server Error SQLSTATE[42S22]: Column not found: 1054 Unknown column 'fields.translationMethod' in 'field list' The SQL being executed was: SELECT fields.id, fields....
0
votes
1answer
286 views

Simple save data to db in Craft CMS

I am new to Craft CMS. Please tell me about how can I save data into database in Craft? I have searched a lot of results about my query but nothing give advantage to me. Thanks in advance.
1
vote
1answer
68 views

Install MySQL stored procedure to database on plugin install in Craft 3

I am trying to add a MySQL stored procedure to the database on plugin install in Craft 3. I currently have an install migration calling a function from the safeUp method. In this function I am using ...