Mathesar 0.1.4¶
Summary¶
Mathesar 0.1.4 focuses on improving the installation and setup experience.
See the upgrading section below for instructions on how to upgrade to this version.
This page provides a comprehensive list of all changes in the release.
New Features¶
UI for configuring database connections¶
Now you can add, edit, and delete connections to multiple databases from within Mathesar’s UI. Previously this was only possible via editing text-based configuration.
#3170 #3223 #3299 #3309 #3319 #3326 #3341 #3348 #3349 #3352 #3354 #3356 #3368 #3377 #3387
Sample data loader¶
When adding a new database connection, you can choose to load sample data into that database. Sample data will be contained within specific schemas and may be useful to help new users play with Mathesar’s features.
PostgreSQL column COMMENTs¶
PostgreSQL COMMENT
values on columns are now exposed via a read/write “description” field within Mathesar. This feature was previously available for schemas and tables and is now available for columns too.
Text-only imports¶
When importing CSV data, Mathesar now gives you the option to use TEXT
as the database type for all columns. This choice speeds up the import for larger data sets by skipping the process of guessing column types.
We are still considering additional ways to improve performance when importing — especially for data sets with lots of columns.
Reduced database privilege installations¶
Mathesar can now be installed as long as the database role used during the installation has at least CONNECT
and CREATE
privileges on the database targeted by the installation. If you want to create a new database for Mathesar’s use, the installation will (naturally) require a role with the CREATEDB
privilege.
Unified Mathesar Docker image¶
The published Mathesar Docker image now contains a PostgreSQL server. This is used to provide a database backend in cases where Mathesar is started via Docker without being configured to connect to any other database.
Metadata storage within SQLite¶
We’ve added experimental SQLite support for the storage of Mathesar metadata. This will allow brave (or foolish) users to run Mathesar with this lighter-weight DB when installing from scratch on Linux.
Improved PostgreSQL compatibility¶
Mathesar now officially supports, and is tested against, Postgres versions 13, 14, and 15. It’s also possible (but not yet recommended) to run Mathesar using Postgres 16.
Easier modification of sorting precedence¶
When you have multiple sorting conditions applied to a table, you can now rearrange them via drag and drop to adjust the precedence of the sorting conditions.
Cell values displayed within sidebar¶
The table sidebar features a new “Cell” tab to show the content of cells, simplifying the process of viewing large text cells.
Groundwork¶
-
We made significant progress towards internationalizing Mathesar’s user interface. We expect to our next release to offer users the ability to toggle between English and Japanese. Subsequent releases will continue to add additional languages.
-
We began some work that will help us eventually distribute Mathesar via a Debian
.deb
package. Some additional work remains but we hope to introduce this installation method in a future version. -
We implemented the backend side of a new feature to import Excel and JSON files through Mathesar’s import UI. More work still remains to implement the frontend side of this feature.
-
We took some baby steps towards building a system to automatically generate human-readable documentation for all our API endpoints. Significant work still remains.
Documentation¶
- We improved and updated our documentation for installing and updating Mathesar. (#3227)
Bug fixes¶
- Tables having
CHECK
constraints are now usable within Mathesar. (#3243) - Records can now be inserted into tables without primary keys. (#3252)
- We fixed inconsistent state when selecting a different column while editing a column’s name. (#3219)
- URL cells now retain their focus after a contained hyperlink is clicked. (#3012)
- Searching for a record via a partially-entered date string no longer gives an error. (#3343)
- The Database Page now shows loading and error indicators. (#3351)
- The Schema Page now displays more detailed information about errors encountered when loading tables and explorations. (#3323)
- Exclusion constraint violations now produce more helpful error messages. (#3200)
- Files with missing or duplicate
id
values can now be imported without error. (#3155) - The record selector can now be closed by clicking on the overlay outside its modal. (#3220)
- Help text for foreign key column data types is now more accurate. (#3260)
- Users of Mathesar’s public demo site will no longer see database connections listed for other demo users. (#3129)
- More UI elements have visually distinctive focus states. (#3313)
- Date formatting is applied to arrays of date values. (#3325)
- On the record page, values within foreign key columns can now be set to
NULL
more intuitively. (#3310) - A visual layout overflow bug on the record page is fixed. (#3303)
- Foreign keys referencing non-primary-key columns now display properly. (#3239)
Maintenance¶
- We made our CI pipeline more robust. (#3254)
- We made some updates to our workflows and developer documentation to support improvements to our issue labeling scheme. (#3338 #3298 #3280 #3336)
- We made some routine upgrades to dependencies and small adjustments to development tooling. (#3214 #3353 #3334 #3201 #3295 #3156 #3234 #3229 #3317)
- We addressed regressions from work during this release. (#3197)
- We improved error handling by preventing storing non-positive IDs for certain objects.(#3177)
- We clarified the API behavior by specifying JSON-only requests (#3090)
- We improved testing against DB objects with long names (#3140)
- We updated our org name to reflect a change from “Center of Complex Interventions” to “Mathesar Foundation”. (#3312)
- We made some improvements to our developer documentation. (#3300 #3210 #3279)
- We improved our process for generating release notes. (#3427)
- We resolved some merge conflicts after finalizing our previous release. (#3190)
Upgrading to 0.1.4¶
The 0.1.4 release requires more upgrade steps than we hope to have for future releases! If you run into any trouble, we encourage you to open an issue or contact us for help.
For installations using Docker Compose¶
If you followed our Docker Compose installation instructions, then use these steps to upgrade your installation to 0.1.4.
Note
Depending on your setup, you may need to run some commands with sudo
.
-
Find needed parts
-
Find your
.env
anddocker-compose.yml
files. Runand look for the value of the
"com.docker.compose.project.config_files"
key in the resulting JSON to find the path to thedocker-compose.yml
file. The.env
file should be in the same directory. If you havejq
installed, you can rundocker inspect mathesar_service \ | jq '.[0].Config.Labels."com.docker.compose.project.config_files"'
and get the path directly. The
.env
file should be in the same directory. -
Copy the path of the directory containing
docker-compose.yml
and.env
into the box below. Do not include a trailing slash.Then press Enter to customize this guide with the configuration directory.
-
If you are using a Docker container for your PostgreSQL database, Run
and look for the
"Mountpoint"
in the resulting JSON. -
Copy the path of the directory into the box below. Do not include a trailing slash.
Then press Enter to customize this guide with the PostgreSQL data directory.
-
-
Stop Mathesar, remove old images
-
Set up new configuration
Warning
MATHESAR_DATABASES
has been deprecated as of v0.1.4 and will be removed entirely in future releases of Mathesar. If you end up deleting the variable from your.env
file before starting up Mathesar after the upgrade, you can still add the connections manually through Mathesar’s UI.-
Back up the old configuration files:
mv xMATHESAR_INSTALLATION_DIRx/docker-compose.yml xMATHESAR_INSTALLATION_DIRx/docker-compose.yml.backup cp xMATHESAR_INSTALLATION_DIRx/.env xMATHESAR_INSTALLATION_DIRx/env.backup
(We’ll modify the old file, so we copy instead of moving it.)
-
Download the new docker compose file:
-
Edit the
xMATHESAR_INSTALLATION_DIRx/.env
file to break theDJANGO_DATABASE_URL
variable into its parts.This variable should have the form:
You should edit the
.env
file to have the variables:POSTGRES_USER=<username> POSTGRES_PASSWORD=<password> POSTGRES_HOST=<host> POSTGRES_PORT=<port> POSTGRES_DB=<database>
If you don’t want to set those environment variables (e.g., if they’re otherwise used), you can instead edit the
docker-compose.yml
file directly to add those variables. -
Double-check the rest of the configuration:
- You should have your
SECRET_KEY
variable defined. - If hosting on the internet, you should have a
DOMAIN_NAME
variable defined.
- You should have your
-
-
Initialize new Mathesar installation
This will pull new images, and start the Mathesar containers. Wait a few minutes, then run
docker ps
to verify that you havemathesar_service
,mathesar-caddy-reverse-proxy-1
, andmathesar_db
running and that the service is healthy. The services should not be reporting errors. If you were not using Docker volumes for your Mathesar PostgreSQL data, you’re done, and you can login to Mathesar via your usual method. If you’re not sure, try to login to Mathesar. If you’re presented with a screen instructing you to create an Admin user, you likely need to proceed to the next step. -
Move your PostgreSQL directory
-
Bring down the services:
-
Remove scaffold database data, copy your old PostgreSQL volume to the new location:
-
Bring the services back up:
-
-
If things look good, then you can try to login at the usual address using your normal username and password, and you should see your data.
For installations done via our guided script¶
If you installed Mathesar with our (now deprecated) guided script, then you have a Docker Compose installation. See the Docker Compose upgrade steps.
For installations done from scratch¶
If you installed Mathesar from scratch, then use these steps to upgrade your installation to 0.1.4.
Warning
These steps have not yet been tested extensively. If you run into any trouble, we encourage you to open an issue or submit a PR proposing changes to this file.
-
Go to your Mathesar installation directory.
Note
Your installation directory may be different from above if you used a different directory when installing Mathesar.
-
Pull version 0.1.4 from the repository
-
Update Python dependencies
-
Next we will activate our virtual environment:
-
Update your environment variables according to the the new configuration specification. In particular, you must put the connection info for the internal DB into new
POSTGRES_*
variables. TheDJANGO_DATABASE_URL
variable is no longer supported. -
Add the environment variables to the shell before running Django commands
-
Run the latest Django migrations
-
Install the frontend dependencies
-
Build the Mathesar frontend app
-
Update Mathesar functions on the database:
-
Restart the gunicorn server