Stack Exchange Network

Stack Exchange network consists of 174 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.

1
vote
2answers
21 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
25 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
38 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
46 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
13 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
23 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
22 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
62 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
39 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
29 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 ...
0
votes
0answers
143 views

“Unsupported DB driver value”

In my quest to get Craft setup on my server, I've run into yet another error. When going to example.com/index.php?p=admin, it quickly redirects to example.com/admin/install, and I get the following ...
1
vote
1answer
150 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
104 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
55 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
26 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 ...
0
votes
0answers
21 views

Table cannot be found in the database - unable to login

We're getting this error when trying to login to Craft (2 not 3), which appears to be related to Craft Neo (https://github.com/benjamminf/craft-neo): Internal Server Error The table "{{neoblocktypes}}...
1
vote
0answers
92 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
207 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
80 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
76 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
124 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
45 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
194 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
87 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
197 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
477 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
331 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
201 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
45 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
96 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 ...
1
vote
1answer
501 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
171 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
70 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
477 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
76 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
79 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
140 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
59 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 ...
1
vote
1answer
179 views

Database structure for Craft 3 to import from external source?

Is there any best practice how to import info Craft 3 data from external source, or should I backtrack it from the database?
1
vote
2answers
388 views

What is the best practice in Craft 3 to sync schema between environments?

How can sync the schema (fields + categories + tags + sections) from development to staging and live? Or should I do it manually? Is there any support to make migration script instead of do it from ...
1
vote
2answers
92 views

Importing a Craft database error

I dumped from Craft my database from server A and am trying to install it to a fresh copy of Craft on server B. I've got Craft up and running, and when I try importing my Craft SQL file in PHPmyAdmin,...
1
vote
1answer
53 views

Display non Craft CMS data with Twig

I have a Craft CMS installation in which there will be other data imported into the db (via Cronjob). It's data from a Weatherstation which will be displayed without further editing in the Control ...
1
vote
2answers
42 views

Database: Syncing “craft_fields” table through SQL dumps not possible?

I've been trying to simply sync an addition to a matrix field building block from my local dev server to the live environment database by doing a SQL dump of the "craft_fields" table. I now have the ...
0
votes
0answers
37 views

amforms: Import form submissions from one site into another

Using Craft 2 and amforms, I created a massive form on a client's temporary site while working on the full refresh on a staging server. While that development's been going on, the live temp site has ...
3
votes
1answer
32 views

Workflow for re-using data structures and setups across projects?

I am wondering if there is a way to re-use pre defined field types and image crops over various Craft projects. I currently in the process of e.g. manually defining 20 different image crops I already ...
3
votes
1answer
2k views

Craft 3: Can't backup database (“mysqldump: command not found”)

I just tried to export the DB on the Database Backup page. Unfortunately, I got an error message saying "There was a problem backing up your database. Please check the Craft logs." So I checked the ...
1
vote
1answer
21 views

DB not connecting on Namespro linux server

I am not a developer nor do I have a technical background, striving to solve a lingering issue with our it/hosting company. This means I unfortunately can't supply code for reference; simply seeking ...
1
vote
2answers
89 views

How to reduce database size?

I'm getting alarmed by the size of the database backups and the database in general. The site has Craft Commerce installed, which contributes I think, but if you look at the following list of backups ...
0
votes
0answers
33 views

PHPUnit DB bootstrap

I have PHPUnit installed and running but am having issues with bootstrapping my db configuration. I am getting Craft can’t connect to the database with the credentials in craft/config/db.php ...
1
vote
1answer
289 views

Craft 3 composer installation

I have installed Craft with Composer and have run the set up command. When I type in my database name I always get the error: Testing database credentials... failed: SQLSTATE[HY000] [1045] Access ...