Giter VIP home page Giter VIP logo

database's Introduction

Money Manager Ex (MMEX)

stable unstable a ci s gha ghl p w i cd c l o

Money Manager Ex (MMEX) is a free/libre, open-source, cross-platform, easy-to-use personal finance software. It helps organize finances and track cash flow.

MMEX includes all the basic features that 90% of users would want to see in a personal finance application. The design goals are to concentrate on simplicity and user-friendliness – an application that can be used everyday.

Features

Download

Download on Flathub

Github All Releases

Screenshots

Dashboard (MMEX 1.7.1-RC.1 64-bit on Linux Mint 21.3 Cinnamon) Payee Report (MMEX 1.7.1-RC.1 64-bit on Linux Mint 21.3 Cinnamon)
Budget Planner (MMEX 1.7.1-RC.1 64-bit on Linux Mint 21.3 Cinnamon) Multiple User Interface Language Support – Hungarian (magyar) (MMEX 1.7.1-RC.1 64-bit on Linux Mint 21.3 Cinnamon)
Category Manager – unlimited nested multi-level category support (MMEX 1.7.1-RC.1 64-bit on Linux Mint 21.3 Cinnamon) Transaction Report Filter (MMEX 1.7.1-RC.1 64-bit on Linux Mint 21.3 Cinnamon)
Import from CSV (Comma-Separated Values) file (MMEX 1.6.4-Beta.4 64-bit on Linux Mint 21.1 Cinnamon) Import from QIF (Quicken Interchange Format) file (MMEX 1.6.4-Beta.4 64-bit on Linux Mint 21.1 Cinnamon)
Export as XML (eXtensible Markup Language) file (MMEX 1.6.4-Beta.4 64-bit on Linux Mint 21.1 Cinnamon) Currency Manager – multi currency support (MMEX 1.7.1-RC.1 64-bit on Linux Mint 21.3 Cinnamon)

Credits

MMEX is mainly written in C++11 and uses the following open-source packages:

External public resources

Slack | Forum | Wiki | Facebook | YouTube | Crowdin | SourceForge | GitHub | Docker images | Twitter tw

Tips

  • Database file (both regular and encrypted) can be opened directly with wxsqliteplus
  • Download dozens of useful reports from the general reports repository
  • Star this repository if you feel it is helpful st

Support

Donate via PayPal

Buy us a Cofee

License

GPL

Translations

CrowdIn

Stargazers over time

Stargazers over time

database's People

Contributors

dbolton avatar gabriele-v avatar guanlisheng avatar n-stein avatar slodki avatar stef145g avatar vomikan avatar whalley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

database's Issues

Set up the upgrade procedure to use migrations (version files)

As we mentioned this topic separately and inside other issues, I'd open a separate issue here.

On Android, in SQLite helper class, there is a method OnUpgrade which gets the database version value automatically. The actual value is stored in Pragmas as User_Version (ref).

I find it convenient to place the upgrade/migration scripts inside this onUpgrade method, as the db engine takes care of the rest (version upgrade, execution of the scripts).

The suggestion is to modify the current process to store the migration scripts (.sql) from version to version, as separate files that can be executed in sequence, instead of having everything in one create_db script.

This way we would get the ability to migrate any data between versions as well as modifications to existing tables.
If we decide to store file-per-version scripts, then you might apply the same logic and execute all "database_version_" + versionNumber + ".sql" scripts to catch up. I believe this would work well for all the platforms and would make the migrations easier in the future.

The change is not significantly different but would allow Android app to upgrade the schema for the users who have old versions or no desktop application at all.
I'm getting exceptions from users on Linux who are missing tables, for example.

db normalization: consolidate CATEGORY and SUBCATEGORY tables

Proposal: store top-level categories in the same table as subcategories but with NULL parent id value.

Two-step implementation:

  1. Migrate categories definition into one table but still use separate CATEGID and SUBCATEGID in the related tables
  2. Drop CATEGID from tables - store only leaf category in them and read upper level category from parent id relation.

This will allow implementing multi-level category hierarchy in the future too (GUI redesign will be required for this) - moneymanagerex/moneymanagerex#1477.

Upgrade script for first step:

drop table if exists CATEGORY_NEW;

create table CATEGORY_NEW(
CATEGID integer primary key
, CATEGNAME TEXT COLLATE NOCASE NOT NULL
, PARENTID integer references CATEGORY_NEW
);
create unique index IDX_CATEGORY_NEW_CATEGNAME_UNIQ on CATEGORY_NEW(CATEGNAME, ifnull(PARENTID,-1));

insert into CATEGORY_NEW select CATEGID, CATEGNAME, NULL from CATEGORY;
insert into CATEGORY_NEW select NULL, SUBCATEGNAME, CATEGID from SUBCATEGORY;

with map as (
  select s.SUBCATEGID as old, n.CATEGID as new
  from SUBCATEGORY as s
  left join CATEGORY_NEW as n on s.CATEGID=n.PARENTID and s.SUBCATEGNAME=n.CATEGNAME
)
update CHECKINGACCOUNT set SUBCATEGID = (select new from map where map.old=CHECKINGACCOUNT.SUBCATEGID)
where SUBCATEGID<>-1;

drop index IDX_CATEGORY_CATEGNAME;
drop index IDX_SUBCATEGORY_CATEGID;
drop index IDX_CATEGORY_NEW_CATEGNAME_UNIQ;
drop table SUBCATEGORY;
drop table CATEGORY;
alter table CATEGORY_NEW rename to CATEGORY;
create index IDX_CATEGORY_PARENTID on CATEGORY(PARENTID);
create index IDX_CATEGORY_CATEGNAME on CATEGORY(CATEGNAME);
create unique index IDX_CATEGORY_CATEGNAME_UNIQ on CATEGORY(CATEGNAME, ifnull(PARENTID,-1));

Consolidate stocks with checking accounts

Idea

  • Treat all currencies, crypto-currencies and stock shares as a single entity used to describe transaction/account value.
  • Reuse checking accounts for both investment and share accounts and store stock purchase/selling transactions as transfers with AMOUNT and TOAMOUNT values.
  • Reuse currency history table for storing stock history too.

Benefits

Sample Dataset

Thank you for your amazing work!
Is there an example dataset with some (at least about 100) records to see it "in action"?

db normalization: consolidate CHECKINGACCOUNT and BILLSDEPOSITS, eliminate BUDGETSPLITTRANSACTIONS

All transaction's details from BILLSDEPOSITS can be stored in CHECKINGACCOUNT with TRANSDATE set to NULL. Then BUDGETSPLITTRANSACTIONS can be migrated to SPLITTRANSACTIONS.

  • All existing queries to CHECKINGACCOUNT should verify TRANSDATE is not null
  • All existing queries to BILLSDEPOSITS should read details from linked CHECKINGACCOUNT and SPLITTRANSACTIONS
  • There is no data lose as TRANSDATE is always equal to NEXTOCCURRENCEDATE in BILLSDEPOSITS

Schema changes (BILLSDEPOSITS simplified, BUDGETSPLITTRANSACTIONS removed):
tables

I don't know if data migration could be implemented in pure SQL...

Removing _v1 suffix not working for lower case

Must be issued DB v. 14 with these patches (updates for lowercase):

UPDATE REPORT SET SQLCONTENT = REPLACE(SQLCONTENT, '_v1', '' ) WHERE SQLCONTENT LIKE '%_v1%';
UPDATE REPORT SET LUACONTENT = REPLACE(LUACONTENT, '_v1', '' ) WHERE LUACONTENT LIKE '%_v1%';
UPDATE REPORT SET TEMPLATECONTENT = REPLACE(TEMPLATECONTENT, '_v1', '' ) WHERE TEMPLATECONTENT LIKE '%_v1%';

purpose of MMEXVERSION in INFOTABLE_V1

> select MMEXVERSION from INFOTABLE_V1;
1.4.0-Alpha.4

I think it means database file created with this version. After changing value to random text it's not overwritten nor used/validated...

Should we change this to CREATED_WITH?
What about upgraded db files? Should we add LAST_SAVED_WITH?

Database user version

What is the current user version of the database schema?
Should we store upgrade scripts separately? Some users are not using the desktop version and I would need to upgrade their schema but I am not sure how to identify the schema versions. Some tables, like stock history, are missing.
Also, I would like to add a table for Asset Allocation and would like it to be synchronised with the desktop version of the application. What is the best way to do this?
Thanks for any tips.

Merge currency updates

There is a pull request with currency updates requested or submitted by the users (#6). Just a reminder to merge when convenient.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.