php-activerecord icon indicating copy to clipboard operation
php-activerecord copied to clipboard

1.x not working with sqlite

Open rapito opened this issue 6 years ago • 3 comments

If you try to connect to a sqlite db, you get a "table not found {table_name}" error.

rapito avatar Mar 29 '18 16:03 rapito

show us the database structure.

jardelsantana avatar Mar 29 '18 17:03 jardelsantana

@jardelsantana

create table transactions
(
	id INTEGER,
	account VARCHAR(4) not null,
	amount_change FLOAT not null,
	action VARCHAR(50) not null,
	balance FLOAT
)
;

create unique index transactions_id_uindex
	on transactions (id)
;

create table users
(
	id INTEGER not null,
	name VARCHAR(50) not null,
	account VARCHAR(4) not null,
	pin VARCHAR(4) not null,
	balance FLOAT
)
;

create unique index users_id_uindex
	on users (id)
;

create unique index users_account_uindex
	on users (account)
;


image

The same script/structure works fine If I switch to MySQL.

rapito avatar Mar 29 '18 18:03 rapito

@jardelsantana Do you know if there's any workaround to fix this? If you have some insight I can jump in the code and submit a pull request

rapito avatar Apr 02 '18 16:04 rapito